From d667a0192a3d5eb8ad49e925652b2dfb2aef3fb4 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 6 May 2018 02:31:58 +0200 Subject: [PATCH] - fix null pointer crash --- src/v_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 87e495242..f43bffd19 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -1334,7 +1334,8 @@ void DFrameBuffer::DrawBlend(sector_t * viewsector) if (players[consoleplayer].camera != nullptr) { player = players[consoleplayer].camera->player; - fullbright = (player->fixedcolormap != NOFIXEDCOLORMAP || player->extralight == INT_MIN || player->fixedlightlevel != -1); + if (player) + fullbright = (player->fixedcolormap != NOFIXEDCOLORMAP || player->extralight == INT_MIN || player->fixedlightlevel != -1); } // don't draw sector based blends when any fullbright screen effect is active.