Merge pull request #3579 from ihsinme/ihsinme-patch-210

fixed memory leak
pull/3593/head
Kim Kulling 2021-01-19 21:18:34 +01:00 committed by GitHub
commit 62e231b452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -61,12 +61,12 @@ namespace Assimp {
void AMFImporter::ParseNode_Mesh(XmlNode &node) {
AMFNodeElementBase *ne = nullptr;
// create new mesh object.
ne = new AMFMesh(mNodeElement_Cur);
// Check for child nodes
if (0 != ASSIMP_stricmp(node.name(), "mesh")) {
return;
}
// create new mesh object.
ne = new AMFMesh(mNodeElement_Cur);
bool found_verts = false, found_volumes = false;
if (!node.empty()) {
ParseHelper_Node_Enter(ne);

View File

@ -165,15 +165,15 @@ void AMFImporter::ParseNode_Texture(XmlNode &node) {
std::string type = node.attribute("type").as_string();
bool tiled = node.attribute("tiled").as_bool();
if (node.empty()) {
return;
}
// create new texture object.
AMFNodeElementBase *ne = new AMFTexture(mNodeElement_Cur);
AMFTexture& als = *((AMFTexture*)ne);// alias for convenience
if (node.empty()) {
return;
}
std::string enc64_data = node.value();
// Check for child nodes