fix more findings.

This commit is contained in:
Kim Kulling
2018-12-28 11:17:27 +01:00
parent db202584ab
commit c1dc3901e7
4 changed files with 19 additions and 5 deletions

View File

@@ -370,7 +370,7 @@ aiLight* XGLImporter::ReadDirectionalLight()
// ------------------------------------------------------------------------------------------------
aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* closetag)
{
std::unique_ptr<aiNode> nd(new aiNode());
aiNode *nd = new aiNode;
std::vector<aiNode*> children;
std::vector<unsigned int> meshes;
@@ -453,11 +453,11 @@ aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* cl
nd->mChildren = new aiNode*[nd->mNumChildren]();
for(unsigned int i = 0; i < nd->mNumChildren; ++i) {
nd->mChildren[i] = children[i];
children[i]->mParent = nd.get();
children[i]->mParent = nd;
}
}
return nd.release();
return nd;
}
// ------------------------------------------------------------------------------------------------