Fix a crash issue in XFileExporter
authorJLouis-B <jeanlouis.boudrand@hotmail.fr>
Wed, 30 Dec 2015 18:01:04 +0000 (19:01 +0100)
committerJLouis-B <jeanlouis.boudrand@hotmail.fr>
Wed, 30 Dec 2015 18:01:04 +0000 (19:01 +0100)
code/XFileExporter.cpp

index 55cf95c..d0d05fe 100644 (file)
@@ -309,12 +309,12 @@ void XFileExporter::WriteNode( aiNode* pNode)
 
     WriteFrameTransform(m);
 
-    for (size_t i = 0; i < pNode->mNumMeshes; i++)
+    for (size_t i = 0; i < pNode->mNumMeshes; ++i)
         WriteMesh(mScene->mMeshes[pNode->mMeshes[i]]);
 
     // recursive call the Nodes
     for (size_t i = 0; i < pNode->mNumChildren; ++i)
-        WriteNode( mScene->mRootNode->mChildren[i]);
+        WriteNode(pNode->mChildren[i]);
 
     PopTag();