-terminate automake session when project is disposed
[idea/community.git] / java / compiler / impl / src / com / intellij / compiler / CompileServerManager.java
index d2862e6289eadceb4b724b2be0096d327d369905..2e5f1dff121982c7ae66d5d20ea3e35176f9c7d9 100644 (file)
@@ -673,6 +673,9 @@ public class CompileServerManager implements ApplicationComponent{
 
     @Override
     public boolean handleBuildEvent(JpsRemoteProto.Message.Response.BuildEvent event) {
+      if (myProject.isDisposed()) {
+        return true;
+      }
       switch (event.getEventType()) {
         case BUILD_COMPLETED:
           if (event.hasCompletionStatus()) {
@@ -696,6 +699,9 @@ public class CompileServerManager implements ApplicationComponent{
 
     @Override
     public void handleCompileMessage(JpsRemoteProto.Message.Response.CompileMessage compileResponse) {
+      if (myProject.isDisposed()) {
+        return;
+      }
       final JpsRemoteProto.Message.Response.CompileMessage.Kind kind = compileResponse.getKind();
       if (kind == JpsRemoteProto.Message.Response.CompileMessage.Kind.ERROR) {
         informWolf(myProject, compileResponse);