TreeUi: NPE fix for isAutoExpand

This commit is contained in:
Kirill Kalishev
2009-11-12 12:08:07 +03:00
parent 7bc6fc53c6
commit 71f10ac0d5
@@ -828,17 +828,20 @@ public class AbstractTreeUi {
final boolean toSmartExpand,
boolean forceUpdate,
final boolean descriptorIsUpToDate) {
getTreeStructure().commit();
final boolean wasExpanded = myTree.isExpanded(new TreePath(node.getPath())) || isAutoExpand(node);
final boolean wasLeaf = node.getChildCount() == 0;
try {
getTreeStructure().commit();
final NodeDescriptor descriptor = getDescriptorFrom(node);
if (descriptor == null) {
removeLoading(node, true);
return;
}
final boolean wasExpanded = myTree.isExpanded(new TreePath(node.getPath())) || isAutoExpand(node);
final boolean wasLeaf = node.getChildCount() == 0;
boolean bgBuild = isToBuildInBackground(descriptor);
boolean notRequiredToUpdateChildren = !forcedNow && !wasExpanded;