From 763888e1ffcd2af6f76e4e79aad05671dc12de5a Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 7 Jul 2020 22:05:36 +0000 Subject: [PATCH] Try to fix a crash OMC had. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5724 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/r_surf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); } }