]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
make getsurface* functions shared between VMs
[xonotic/darkplaces.git] / model_brush.c
index 052d365041115e73405f5ca908a1a0cefc9285db..7b965f450895a72e8e1fccb8b5b50c5537c97327 100644 (file)
@@ -1209,7 +1209,7 @@ loc0:
                        surface = model->data_surfaces + node->firstsurface;
                        for (i = 0;i < node->numsurfaces;i++, surface++)
                        {
-                               if (!(surface->texture->basematerialflags & MATERIALFLAG_WALL) || !surface->lightmapinfo->samples)
+                               if (!(surface->texture->basematerialflags & MATERIALFLAG_WALL) || !surface->lightmapinfo || !surface->lightmapinfo->samples)
                                        continue;       // no lightmaps
 
                                // location we want to sample in the lightmap