fixed issue in GTree where calling setChildren with exiting children put

the tree in a bad state
This commit is contained in:
ghidravore
2020-02-14 17:22:59 -05:00
parent 1c415bc053
commit b88946787b

View File

@@ -169,7 +169,11 @@ abstract class CoreGTreeNode implements Cloneable {
if (oldChildren != null) {
for (GTreeNode node : oldChildren) {
node.dispose();
// only dispose old nodes that aren't included in the new child list - if any
// old nodes don't have a parent, then they were not include in the new list
if (node.getParent() == null) {
node.dispose();
}
}
}
}