documentor: extra check for proper exit when disabling command piping
authorJerome St-Louis <jerome@ecere.com>
Mon, 30 Sep 2013 06:16:46 +0000 (02:16 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 30 Sep 2013 06:16:46 +0000 (02:16 -0400)
documentor/src/Documentor.ec

index e023976..3663100 100644 (file)
@@ -3736,11 +3736,14 @@ class Documentor : GuiApplication
       PrintLn("Exited");
       console.Flush();
       quit = true;
-      console.CloseInput();
-      console.CloseOutput();
-      app.Unlock();
-      commandThread.Wait();
-      app.Lock();
+      if(commandThread.created)
+      {
+         console.CloseInput();
+         console.CloseOutput();
+         app.Unlock();
+         commandThread.Wait();
+         app.Lock();
+      }
 
       FreeContext(globalContext);
       FreeExcludedSymbols(excludedSymbols);