Last active
May 27, 2016 17:52
-
-
Save Zerophase/aee0e2ebadf211256dde3f8a275e2389 to your computer and use it in GitHub Desktop.
TinyXML2 segfault
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c = content->FirstChildElement("Connection"); | |
while(dialogues[0] != nullptr) // rewrite to iterate to the next dialogue | |
{ | |
if(c->FirstChildElement("Source")->Attribute("IdRef", rightTarget.front().c_str())) | |
connectionNodes.push_back(c); | |
if(c != nullptr) | |
c = c->NextSiblingElement("Connection"); | |
if(c == nullptr) | |
{ | |
FindDialogueChildren(dialogues, connectionNodes, orderedNodes, sourceCount, childTypes); | |
c = content->FirstChildElement("Connection"); // segfault occurs here third time it is hit. | |
while(c != nullptr) | |
{ | |
while(c != nullptr && !c->FirstChildElement("Source")->Attribute("IdRef", id.c_str())) | |
{ | |
c = c->NextSiblingElement("Connection"); | |
} | |
if(c != nullptr) | |
{ | |
connectionNodes.push_back(c); | |
c = c->NextSiblingElement("Connection"); | |
} | |
} | |
c = content->FirstChildElement("Connection'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment