From e86ad109f5b381e160458c049bd9351800ccb32f Mon Sep 17 00:00:00 2001 From: eihrul Date: Sat, 1 Oct 2011 02:01:07 +0000 Subject: [PATCH] fix crash when compiling shadowmaps for certain Q3BSP files with no faces git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11379 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gl_rsurf.c b/gl_rsurf.c index 4f7d7f3d..402208d7 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1353,6 +1353,8 @@ void R_Q1BSP_CompileShadowMap(entity_render_t *ent, vec3_t relativelightorigin, int surfacelistindex; int sidetotals[6] = { 0, 0, 0, 0, 0, 0 }, sidemasks = 0; int i; + if (!model->brush.shadowmesh) + return; r_shadow_compilingrtlight->static_meshchain_shadow_shadowmap = Mod_ShadowMesh_Begin(r_main_mempool, 32768, 32768, NULL, NULL, NULL, false, false, true); R_Shadow_PrepareShadowSides(model->brush.shadowmesh->numtriangles); for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++) -- 2.39.2