Skip to content

Commit 6d1ae38

Browse files
TextureLoader: Add null checks for D3DTexture after creation
1 parent ea1377d commit 6d1ae38

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,10 @@ bool TextureLoadTaskClass::Begin_Compressed_Load(void)
15321532
#endif
15331533
);
15341534

1535+
if (!D3DTexture) {
1536+
return false;
1537+
}
1538+
15351539
MipLevelCount = mip_level_count;
15361540

15371541
return true;
@@ -1627,6 +1631,10 @@ bool TextureLoadTaskClass::Begin_Uncompressed_Load(void)
16271631
#endif
16281632
);
16291633

1634+
if (!D3DTexture) {
1635+
return false;
1636+
}
1637+
16301638
return true;
16311639
}
16321640

0 commit comments

Comments
 (0)