diff --git a/code/MaterialSystem.cpp b/code/MaterialSystem.cpp index dc8f5fc5e..aa17d5458 100644 --- a/code/MaterialSystem.cpp +++ b/code/MaterialSystem.cpp @@ -482,8 +482,9 @@ aiReturn aiMaterial::AddBinaryProperty (const void* pInput, aiMaterialProperty** ppTemp; try { - ppTemp = new aiMaterialProperty*[mNumAllocated]; + ppTemp = new aiMaterialProperty*[mNumAllocated]; } catch (std::bad_alloc&) { + delete pcNew; return AI_OUTOFMEMORY; }