From df66ee1ad92972d73da87e1f9e69d4fed9689fd5 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Thu, 7 Dec 2023 07:07:21 -0500 Subject: [PATCH] Avoid calling Curses after it is shut down --- win/curses/cursmain.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 088d9614a..2d4f278bc 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -841,9 +841,11 @@ wait_synch() -- Wait until all pending output is complete (*flush*() for void curses_wait_synch(void) { - if (curses_got_output()) - (void) curses_more(); - curses_mark_synch(); + if (iflags.window_inited) { + if (curses_got_output()) + (void) curses_more(); + curses_mark_synch(); + } /* [do we need 'if (counting) curses_count_window((char *)0);' here?] */ }