From a7a899ca1464996f333b679be64ca5818384f181 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 6 Dec 2019 00:19:51 +0100 Subject: [PATCH] Fix null pointer crash --- src/rendering/swrenderer/viewport/r_spritedrawer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rendering/swrenderer/viewport/r_spritedrawer.cpp b/src/rendering/swrenderer/viewport/r_spritedrawer.cpp index 99a7eb997..9a0586076 100644 --- a/src/rendering/swrenderer/viewport/r_spritedrawer.cpp +++ b/src/rendering/swrenderer/viewport/r_spritedrawer.cpp @@ -139,6 +139,9 @@ namespace swrenderer int texwidth = tex->GetPhysicalWidth(); int texheight = tex->GetPhysicalHeight(); + dc_viewport = thread->Viewport.get(); + dc_textureheight = texheight; + vstepY *= texheight; for (int x = sx0; x < sx1; x++)