merge
[fanfix.git] / src / jexer / TTerminalWindow.java
index 336c3ff8db7cd19c2a6761f98469cc869f0b6b78..010cc4993eaa139f5b67ad2a5dedac36f00b3e44 100644 (file)
@@ -242,7 +242,12 @@ public class TTerminalWindow extends TWindow {
      * Handle window close.
      */
     @Override public void onClose() {
-        emulator.close();
+        if (shell != null) {
+            shell.destroy();
+            shell = null;
+        } else {
+            emulator.close();
+        }
     }
 
     /**