Fix EDU-571 Project is already disposed
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 5 Aug 2016 14:53:52 +0000 (17:53 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 5 Aug 2016 14:58:26 +0000 (17:58 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java

index 82df5b47bd408519aa2394863647608a94489b41..092ce8f2a52ca3dd4eb26d9eccc0dcd5c2b78476 100644 (file)
@@ -194,6 +194,8 @@ public class StudyUtils {
 
   @Nullable
   public static StudyToolWindow getStudyToolWindow(@NotNull final Project project) {
+    if (project.isDisposed()) return null;
+    
     ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(StudyToolWindowFactory.STUDY_TOOL_WINDOW);
     if (toolWindow != null) {
       Content[] contents = toolWindow.getContentManager().getContents();