]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix two checks to not crash when showtex is used without a loaded worldmodel
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Nov 2011 14:33:48 +0000 (14:33 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Nov 2011 14:33:48 +0000 (14:33 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11531 d7cf8633-e32d-0410-b094-e92efae38249

world.c

diff --git a/world.c b/world.c
index c56f405c5106799be81187db51b0fc3b40645306..2fdcda3c1282b71dd5824d0b9a6becadc0cfff51 100644 (file)
--- a/world.c
+++ b/world.c
@@ -211,7 +211,7 @@ int World_EntitiesInBox(world_t *world, const vec3_t requestmins, const vec3_t r
        numlist = 0;
        // add entities not linked into areagrid because they are too big or
        // outside the grid bounds
-       if (world->areagrid_outside.next != &world->areagrid_outside)
+       if (world->areagrid_outside.next)
        {
                grid = &world->areagrid_outside;
                for (l = grid->next;l != grid;l = l->next)
@@ -236,7 +236,7 @@ int World_EntitiesInBox(world_t *world, const vec3_t requestmins, const vec3_t r
                grid = world->areagrid + igrid[1] * AREA_GRID + igridmins[0];
                for (igrid[0] = igridmins[0];igrid[0] < igridmaxs[0];igrid[0]++, grid++)
                {
-                       if (grid->next != grid)
+                       if (grid->next)
                        {
                                for (l = grid->next;l != grid;l = l->next)
                                {