EA-144968 - NPE: UpdateInfoTree.getSelectedFilePointer

GitOrigin-RevId: 96a84e3a476fcc03e06df47c88b9d2d585f5b27b
This commit is contained in:
Aleksey Pivovarov
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent 3b991b20ca
commit b0ec588072
@@ -316,7 +316,9 @@ public class UpdateInfoTree extends PanelWithActionsAndCloseButton {
@Nullable
private VirtualFilePointer getSelectedFilePointer() {
AbstractTreeNode treeNode = (AbstractTreeNode)myTree.getSelectionPath().getLastPathComponent();
TreePath path = myTree.getSelectionPath();
if (path == null) return null;
AbstractTreeNode treeNode = (AbstractTreeNode)path.getLastPathComponent();
return treeNode instanceof FileTreeNode ? ((FileTreeNode)treeNode).getFilePointer() : null;
}