2
0
Эх сурвалжийг харах

fix mem-lead: face will be not released in case of an error.

Kim Kulling 8 жил өмнө
parent
commit
a33e115fd1

+ 1 - 0
code/ObjFileParser.cpp

@@ -477,6 +477,7 @@ void ObjFileParser::getFace( aiPrimitiveType type ) {
                 }
             } else {
                 //On error, std::atoi will return 0 which is not a valid value
+                delete face;
                 delete m_pModel;
                 m_pModel = nullptr;
                 throw DeadlyImportError("OBJ: Invalid face indice");