diff --git a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index f46cffff6ee..6f1a0d3adb6 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -1530,6 +1530,10 @@ bool TextureLoadTaskClass::Begin_Compressed_Load() #endif ); + if (!D3DTexture) { + return false; + } + MipLevelCount = mip_level_count; return true; @@ -1625,6 +1629,10 @@ bool TextureLoadTaskClass::Begin_Uncompressed_Load() #endif ); + if (!D3DTexture) { + return false; + } + return true; } @@ -1775,6 +1783,10 @@ bool TextureLoadTaskClass::Begin_Uncompressed_Load() void TextureLoadTaskClass::Lock_Surfaces() { + if (!D3DTexture) { + return; + } + MipLevelCount = D3DTexture->GetLevelCount(); for (unsigned int i = 0; i < MipLevelCount; ++i)