diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp index 0db2cabb0..eef7b18f6 100644 --- a/code/MDLMaterialLoader.cpp +++ b/code/MDLMaterialLoader.cpp @@ -206,7 +206,10 @@ void MDLImporter::CreateTexture_3DGS_MDL4(const unsigned char* szData, delete[] pc; } } - else delete pcNew; + else { + pcNew->pcData = NULL; + delete pcNew; + } return; }