]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
Fix crash when building Q3BSP lightgrid. Added missing R_AllocTexturePool call.
[xonotic/darkplaces.git] / 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;