- fixed crash in the precaching code.

This didn't detect software canvas textures and crashed on the missing image.
This commit is contained in:
Christoph Oelckers 2019-01-14 00:09:36 +01:00
parent 141d5bdf3e
commit 9b2c11a612

View file

@ -86,7 +86,7 @@ void FSoftwareRenderer::PreparePrecache(FTexture *ttex, int cache)
{ {
bool isbgra = V_IsTrueColor(); bool isbgra = V_IsTrueColor();
if (ttex != NULL && ttex->isValid()) if (ttex != nullptr && ttex->isValid() && !ttex->isCanvas())
{ {
FSoftwareTexture *tex = ttex->GetSoftwareTexture(); FSoftwareTexture *tex = ttex->GetSoftwareTexture();
@ -105,7 +105,7 @@ void FSoftwareRenderer::PrecacheTexture(FTexture *ttex, int cache)
{ {
bool isbgra = V_IsTrueColor(); bool isbgra = V_IsTrueColor();
if (ttex != NULL && ttex->isValid()) if (ttex != nullptr && ttex->isValid() && !ttex->isCanvas())
{ {
FSoftwareTexture *tex = ttex->GetSoftwareTexture(); FSoftwareTexture *tex = ttex->GetSoftwareTexture();
if (cache & FTextureManager::HIT_Columnmode) if (cache & FTextureManager::HIT_Columnmode)