diff --git a/source/com/intellij/openapi/vcs/actions/VcsContextWrapper.java b/source/com/intellij/openapi/vcs/actions/VcsContextWrapper.java index 7408cc5f2042..71fa884e32d2 100644 --- a/source/com/intellij/openapi/vcs/actions/VcsContextWrapper.java +++ b/source/com/intellij/openapi/vcs/actions/VcsContextWrapper.java @@ -156,8 +156,12 @@ public class VcsContextWrapper implements VcsContext { ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project); if (toolWindowManager == null) return null; ToolWindowEx fileViewToolWindow =(ToolWindowEx) toolWindowManager.getToolWindow(ProjectLevelVcsManager.FILE_VIEW_TOOL_WINDOW_ID); - final JComponent component = fileViewToolWindow.getComponent(); - return ((FileViewPanel) component); + if (fileViewToolWindow.isAvailable()) { + final JComponent component = fileViewToolWindow.getComponent(); + return ((FileViewPanel) component); + } else { + return null; + } } public FilePath[] getSelectedFilePaths() {