diff --git a/engine/client/r_surf.c b/engine/client/r_surf.c index 0c68e5a07..f3c5a2629 100644 --- a/engine/client/r_surf.c +++ b/engine/client/r_surf.c @@ -254,7 +254,8 @@ void Surf_WipeStains(void) { if (!lightmap[i]) break; - memset(lightmap[i]->stainmaps, 255, lightmap[i]->width*lightmap[i]->height*3*sizeof(stmap)); + if (lightmap[i]->stainmaps) + memset(lightmap[i]->stainmaps, 255, lightmap[i]->width*lightmap[i]->height*3*sizeof(stmap)); } }