]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix crash when compiling shadowmaps for certain Q3BSP files with no faces
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Oct 2011 02:01:07 +0000 (02:01 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Oct 2011 02:01:07 +0000 (02:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11379 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c

index 4f7d7f3ddd0331f5a1541cf1a209777c9a3821e1..402208d750d737168cb145dbbb9d465a1ea280ca 100644 (file)
@@ -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++)