From: cloudwalk Date: Tue, 26 May 2020 17:48:44 +0000 (+0000) Subject: Fix crash when building Q3BSP lightgrid. Added missing R_AllocTexturePool call. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7584e8c2a5eac1d97cd9d1b74d0e52532e5cb8e0;p=xonotic%2Fdarkplaces.git Fix crash when building Q3BSP lightgrid. Added missing R_AllocTexturePool call. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12593 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index 9e92e530..e24563f3 100644 --- a/model_brush.c +++ b/model_brush.c @@ -6659,6 +6659,10 @@ static void Mod_Q3BSP_LoadLightGrid(lump_t *l) // ambient color // bent-normal light color // bent-normal light dir + + if (loadmodel->texturepool == NULL) + loadmodel->texturepool = R_AllocTexturePool(); + texturesize[0] = loadmodel->brushq3.num_lightgrid_isize[0]; texturesize[1] = loadmodel->brushq3.num_lightgrid_isize[1]; texturesize[2] = (loadmodel->brushq3.num_lightgrid_isize[2] + 2) * 3;