From 456f22ac9ec664c9e5f4aeaf42e658dcbf56b11a Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Wed, 20 Jun 2012 14:08:02 +0200 Subject: [PATCH] ensure the path is never null --- .../intellij/lang/ant/config/execution/TreeView.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java b/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java index 0bf420d2f77e..b0e2527c2e1a 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java @@ -447,12 +447,18 @@ public final class TreeView implements AntOutputView, OccurenceNavigator { } public void finishTarget() { - myParentPath = myParentPath.getParentPath(); + final TreePath parentPath = myParentPath.getParentPath(); + if (parentPath != null) { + myParentPath = parentPath; + } } public void finishTask() { myCurrentTaskName = null; - myParentPath = myParentPath.getParentPath(); + final TreePath parentPath = myParentPath.getParentPath(); + if (parentPath != null) { + myParentPath = parentPath; + } } @Nullable