From d3205f46a8749882c6d0bf610f238c1ceb71a033 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 11 Jan 2019 19:44:52 +0100 Subject: [PATCH] - fix null pointer crash --- src/swrenderer/textures/r_swtexture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swrenderer/textures/r_swtexture.h b/src/swrenderer/textures/r_swtexture.h index 1d224a9d0a..319144d904 100644 --- a/src/swrenderer/textures/r_swtexture.h +++ b/src/swrenderer/textures/r_swtexture.h @@ -191,8 +191,8 @@ public: virtual void Unload() override; void UpdatePixels(bool truecolor); - DCanvas *GetCanvas() { return Canvas; } - DCanvas *GetCanvasBgra() { return CanvasBgra; } + DCanvas *GetCanvas() { GetPixels(0); return Canvas; } + DCanvas *GetCanvasBgra() { GetPixelsBgra(); return CanvasBgra; } bool Mipmapped() override { return false; } };