]> git.rm.cloudns.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)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 6 Nov 2011 14:32:40 +0000 (15:32 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11531 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=151f7ab8f644bb5cc68c841a013acc0d80a10c76

world.c

diff --git a/world.c b/world.c
index ec767e0415335322b39ccf87da497a7f9c12f1e9..a7e8d4def873bb39a7093e98c9ff1b1c9583e4ce 100644 (file)
--- a/world.c
+++ b/world.c
@@ -208,7 +208,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)
@@ -233,7 +233,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)
                                {