]> granicus.if.org Git - nethack/commitdiff
clean up some tear-down
authornhmall <nhmall@nethack.org>
Sun, 9 Dec 2018 04:04:53 +0000 (23:04 -0500)
committernhmall <nhmall@nethack.org>
Sun, 9 Dec 2018 04:04:53 +0000 (23:04 -0500)
Windows continued to use function pointers belonging
to particular window ports that were still assigned
even after that port (tty) had gone through its
shutdown procedures when requested by the core.
Fix that and return to the minimal function pointers
that are not part of any of the actual WindowPorts.

sys/winnt/winnt.c

index 86432e028b05e360f160b01f699828fcb3c98db8..75dda292d49c7e22b85a59640541794b715576f7 100644 (file)
@@ -507,12 +507,13 @@ int code;
      * not vanish instantly after being created.
      * GUILaunched is defined and set in nttty.c.
      */
-    synch_cursor();
+
     if (GUILaunched)
-        getreturn("to end");
-    synch_cursor();
-    getreturn_enabled = TRUE;
-    wait_synch();
+        getreturn_enabled = TRUE;
+    else
+        windowprocs = *get_safe_procs(1);
+    if (getreturn_enabled)
+        wait_synch();
     exit(code);
 }