mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPE
This commit is contained in:
@@ -93,7 +93,8 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider,
|
||||
}
|
||||
|
||||
public boolean canExpand() {
|
||||
return AntConfiguration.getInstance(myProject).getBuildFiles().length != 0;
|
||||
final Project project = myProject;
|
||||
return project != null && AntConfiguration.getInstance(project).getBuildFiles().length != 0;
|
||||
}
|
||||
|
||||
public void collapseAll() {
|
||||
@@ -453,7 +454,7 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider,
|
||||
return HelpID.ANT;
|
||||
}
|
||||
else if (PlatformDataKeys.TREE_EXPANDER.is(dataId)) {
|
||||
return myTreeExpander;
|
||||
return myProject != null? myTreeExpander : null;
|
||||
}
|
||||
else if (PlatformDataKeys.VIRTUAL_FILE_ARRAY.is(dataId)) {
|
||||
final TreePath[] paths = myTree.getSelectionPaths();
|
||||
|
||||
Reference in New Issue
Block a user