From 9b2c11a612531bc891590a813bcc012cf4b19d77 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 14 Jan 2019 00:09:36 +0100 Subject: [PATCH] - fixed crash in the precaching code. This didn't detect software canvas textures and crashed on the missing image. --- src/swrenderer/r_swrenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swrenderer/r_swrenderer.cpp b/src/swrenderer/r_swrenderer.cpp index 873f5c85d..341426532 100644 --- a/src/swrenderer/r_swrenderer.cpp +++ b/src/swrenderer/r_swrenderer.cpp @@ -86,7 +86,7 @@ void FSoftwareRenderer::PreparePrecache(FTexture *ttex, int cache) { bool isbgra = V_IsTrueColor(); - if (ttex != NULL && ttex->isValid()) + if (ttex != nullptr && ttex->isValid() && !ttex->isCanvas()) { FSoftwareTexture *tex = ttex->GetSoftwareTexture(); @@ -105,7 +105,7 @@ void FSoftwareRenderer::PrecacheTexture(FTexture *ttex, int cache) { bool isbgra = V_IsTrueColor(); - if (ttex != NULL && ttex->isValid()) + if (ttex != nullptr && ttex->isValid() && !ttex->isCanvas()) { FSoftwareTexture *tex = ttex->GetSoftwareTexture(); if (cache & FTextureManager::HIT_Columnmode)