Skip to content

Commit

Permalink
- fixed crash in the precaching code.
Browse files Browse the repository at this point in the history
This didn't detect software canvas textures and crashed on the missing image.
  • Loading branch information
coelckers committed Jan 13, 2019
1 parent bd964d4 commit dd5addd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swrenderer/r_swrenderer.cpp
Expand Up @@ -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();

Expand All @@ -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)
Expand Down

0 comments on commit dd5addd

Please sign in to comment.