diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java index b23f018db93c..c766e337cb32 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java @@ -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; }