Skip to content

Commit d8bc0a2

Browse files
Flanker-MSFTFlanker-MSFT
authored andcommitted
Fix possible NPE in AbstractAzureFacetNode
1 parent e68d889 commit d8bc0a2

File tree

1 file changed

+4
-0
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-facet/src/main/java/com/microsoft/azure/toolkit/intellij/facet/projectexplorer

1 file changed

+4
-0
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-facet/src/main/java/com/microsoft/azure/toolkit/intellij/facet/projectexplorer/AbstractAzureFacetNode.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ private void rerender(boolean updateStructure) { // `static` to make it availabl
106106
return;
107107
}
108108
final AbstractProjectViewPane pane = ProjectView.getInstance(this.getProject()).getCurrentProjectViewPane();
109+
if (Objects.isNull(pane) || Objects.isNull(pane.getTree())) {
110+
Disposer.dispose(this);
111+
return;
112+
}
109113
final AsyncTreeModel model = (AsyncTreeModel) pane.getTree().getModel();
110114
final DefaultMutableTreeNode node = TreeUtil.findNodeWithObject((DefaultMutableTreeNode) model.getRoot(), this);
111115
if (Objects.nonNull(node)) {

0 commit comments

Comments
 (0)