Skip to content

Instantly share code, notes, and snippets.

@DirtYiCE
Created February 27, 2011 23:18
Show Gist options
  • Save DirtYiCE/846686 to your computer and use it in GitHub Desktop.
Save DirtYiCE/846686 to your computer and use it in GitHub Desktop.
dgAABBPolygonSoup segfault
Index: coreLibrary_200/source/core/dgAABBPolygonSoup.cpp
===================================================================
--- coreLibrary_200/source/core/dgAABBPolygonSoup.cpp (revision 141)
+++ coreLibrary_200/source/core/dgAABBPolygonSoup.cpp (working copy)
@@ -434,6 +434,8 @@
maxPasses --;
} while (maxPasses && (newCost < prevCost));
+ if (!nodesList.GetLast()) return root;
+
dgConstructionTree* newRoot = nodesList.GetLast()->GetInfo();
while (newRoot->m_parent) {
newRoot = newRoot->m_parent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment