]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix crash when building Q3BSP lightgrid. Added missing R_AllocTexturePool call.
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 26 May 2020 17:48:44 +0000 (17:48 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 26 May 2020 17:48:44 +0000 (17:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12593 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 9e92e5307c71e706d777adcaf006f96c344d570e..e24563f30ea9e70dd45babedc3ac0edec8bf53c9 100644 (file)
@@ -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;