IDEA-160349 NPE fixed; don't try to delete already removed node

This commit is contained in:
Dmitry.Krasilschikov
2017-03-14 17:31:17 +03:00
parent c59d67844f
commit 7cdf106e57
@@ -773,6 +773,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom
final NamedConfigurable namedConfigurable = node.getConfigurable();
final Object editableObject = namedConfigurable.getEditableObject();
parentNode = (MyNode)node.getParent();
if (parentNode == null) continue;
idx = parentNode.getIndex(node);
((DefaultTreeModel)myTree.getModel()).removeNodeFromParent(node);
myHasDeletedItems |= wasObjectStored(editableObject);