From 6d1ae386bdcda96fab07c28ce6ef5baeb95a9e60 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 23:16:35 +0000 Subject: [PATCH] TextureLoader: Add null checks for D3DTexture after creation --- .../Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index 7d1795a9eb4..ebe46b86243 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -1532,6 +1532,10 @@ bool TextureLoadTaskClass::Begin_Compressed_Load(void) #endif ); + if (!D3DTexture) { + return false; + } + MipLevelCount = mip_level_count; return true; @@ -1627,6 +1631,10 @@ bool TextureLoadTaskClass::Begin_Uncompressed_Load(void) #endif ); + if (!D3DTexture) { + return false; + } + return true; }