In the function TiXmlDocument::Parse, the TiXmlNode* type variable node is freed through the call to LinkEndChild. It is then de-referenced later using node->ToDeclaration(). At that point, a program crash could occur.
Maybe a fix would be to call LinkEndChild as the last instruction of the while loop ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the function TiXmlDocument::Parse, the TiXmlNode* type variable node is freed through the call to LinkEndChild. It is then de-referenced later using node->ToDeclaration(). At that point, a program crash could occur.
Maybe a fix would be to call LinkEndChild as the last instruction of the while loop ?