EA-33250 - assert: ComponentManagerImpl.getComponent
authorDmitry Jemerov <yole@jetbrains.com>
Tue, 31 Jan 2012 18:07:36 +0000 (19:07 +0100)
committerDmitry Jemerov <yole@jetbrains.com>
Tue, 31 Jan 2012 18:07:36 +0000 (19:07 +0100)
platform/platform-impl/src/com/intellij/ide/actions/BackAction.java
platform/platform-impl/src/com/intellij/ide/actions/ForwardAction.java

index 71fbd5c59a8026dd8d15e0a93fa2f92e9b906041..f249b52bb532b48b190e2f73b38a90317b7688b9 100644 (file)
@@ -34,7 +34,7 @@ public class BackAction extends AnAction implements DumbAware {
   public void update(AnActionEvent event){
     Presentation presentation = event.getPresentation();
     Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
   public void update(AnActionEvent event){
     Presentation presentation = event.getPresentation();
     Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
-    if (project == null) {
+    if (project == null || project.isDisposed()) {
       presentation.setEnabled(false);
       return;
     }
       presentation.setEnabled(false);
       return;
     }
index 6bdd6407e1062ed31bbd15a768500f9f96855f03..17dedb17e0d6b05dc9be089ae6f8a1cdf38e6e5a 100644 (file)
@@ -34,7 +34,7 @@ public class ForwardAction extends AnAction implements DumbAware {
   public void update(AnActionEvent event){
     Presentation presentation = event.getPresentation();
     Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
   public void update(AnActionEvent event){
     Presentation presentation = event.getPresentation();
     Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
-    if (project == null) {
+    if (project == null || project.isDisposed()) {
       presentation.setEnabled(false);
       return;
     }
       presentation.setEnabled(false);
       return;
     }