From: havoc Date: Sun, 11 Sep 2005 11:38:38 +0000 (+0000) Subject: use a better check for bmodels when clearing stainmaps which won't happen on old... X-Git-Tag: xonotic-v0.1.0preview~4562 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74e5ebeb9653bf7b9e2611ec5cdbc1c04c3b4321;p=xonotic%2Fdarkplaces.git use a better check for bmodels when clearing stainmaps which won't happen on old submodels (which might not be unloaded yet when this function is called) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5719 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_shared.c b/model_shared.c index 0d7122ac..f896b784 100644 --- a/model_shared.c +++ b/model_shared.c @@ -61,7 +61,7 @@ static void mod_newmap(void) for (i = 0;i < MAX_MOD_KNOWN;i++) { - if (mod_known[i].name[0]) + if (mod_known[i].mempool && mod_known[i].data_surfaces) { for (surfacenum = 0, surface = mod_known[i].data_surfaces;surfacenum < mod_known[i].num_surfaces;surfacenum++, surface++) {