From 501aa9b03bc1f7409e977a5feb929db3ed8bc80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Fri, 25 Dec 2015 11:49:31 +0200 Subject: [PATCH] Fixed|Client: Crash when performing a reset with no map loaded There was a null pointer access when setting Fog parameters. --- doomsday/apps/client/src/gl/gl_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doomsday/apps/client/src/gl/gl_main.cpp b/doomsday/apps/client/src/gl/gl_main.cpp index 54dd55702f..e7207ae4a5 100644 --- a/doomsday/apps/client/src/gl/gl_main.cpp +++ b/doomsday/apps/client/src/gl/gl_main.cpp @@ -550,7 +550,7 @@ void GL_SetupFogFromMapInfo(Record const *mapInfo) R_SetupFogDefaults(); } - if(!(mapInfo->geti("flags") & MIF_FOG)) + if(mapInfo && !(mapInfo->geti("flags") & MIF_FOG)) { GL_UseFog(false); }