diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 8f80045067..a1e832c795 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -2544,7 +2544,7 @@ void W3DDisplay::drawImage( const Image *image, Int startX, Int startY, } // if we have raw texture data we will use it, otherwise we are referencing filenames - if( BitIsSet( image->getStatus(), IMAGE_STATUS_RAW_TEXTURE ) ) + if( BitIsSet( image->getStatus(), IMAGE_STATUS_RAW_TEXTURE ) && image->getRawTextureData() != nullptr ) m_2DRender->Set_Texture( (TextureClass *)(image->getRawTextureData()) ); else m_2DRender->Set_Texture( image->getFilename().str() ); diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 7c1a34ab44..0c4e5fe1a9 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -2642,7 +2642,7 @@ void W3DDisplay::drawImage(const Image* image, Int startX, Int startY, } // if we have raw texture data we will use it, otherwise we are referencing filenames - if (BitIsSet(image->getStatus(), IMAGE_STATUS_RAW_TEXTURE)) + if (BitIsSet(image->getStatus(), IMAGE_STATUS_RAW_TEXTURE) && image->getRawTextureData() != nullptr) m_2DRender->Set_Texture((TextureClass*)(image->getRawTextureData())); else m_2DRender->Set_Texture(image->getFilename().str());