diff --git a/src/org/intellij/sequencer/SequencePlugin2.java b/src/org/intellij/sequencer/SequencePlugin2.java index f6e160cc..ad2dc886 100644 --- a/src/org/intellij/sequencer/SequencePlugin2.java +++ b/src/org/intellij/sequencer/SequencePlugin2.java @@ -82,10 +82,15 @@ public static SequencePlugin2 getInstance(Project project) { } public void projectClosed() { - try{ + try { getToolWindowManager().unregisterToolWindow(PLAGIN_NAME); } catch (AlreadyDisposedException e) { - + //ignore + } catch (IllegalStateException e) { + if (!e.getMessage().startsWith("Project-level session is not set")) { + throw e; + } + //else ignore } }