From 7584e8c2a5eac1d97cd9d1b74d0e52532e5cb8e0 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Tue, 26 May 2020 17:48:44 +0000 Subject: [PATCH] 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 --- model_brush.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.2