From: divverent Date: Sun, 6 Nov 2011 14:33:48 +0000 (+0000) Subject: fix two checks to not crash when showtex is used without a loaded worldmodel X-Git-Tag: xonotic-v0.6.0~163^2~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=151f7ab8f644bb5cc68c841a013acc0d80a10c76;p=xonotic%2Fdarkplaces.git 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 --- 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) {