From 151f7ab8f644bb5cc68c841a013acc0d80a10c76 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 6 Nov 2011 14:33:48 +0000 Subject: [PATCH] fix two checks to not crash when showtex is used without a loaded worldmodel git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11531 d7cf8633-e32d-0410-b094-e92efae38249 --- world.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/world.c b/world.c index c56f405c..2fdcda3c 100644 --- 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) { -- 2.39.2