From 8a4bd09d9b166496174ac1addc29b945b2c4888f Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 18 Apr 2021 04:07:56 -0400 Subject: [PATCH] demo: stop input on error path before notcurses_stop() --- src/demo/demo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/demo/demo.c b/src/demo/demo.c index d6995e9bf..bedc38dd2 100644 --- a/src/demo/demo.c +++ b/src/demo/demo.c @@ -592,9 +592,7 @@ int main(int argc, char** argv){ about_destroy(nc); }while(restart_demos); ncmenu_destroy(menu); - if(stop_input()){ - goto err; - } + stop_input(); if(notcurses_stop(nc)){ return EXIT_FAILURE; } @@ -620,6 +618,7 @@ int main(int argc, char** argv){ return EXIT_SUCCESS; err: + stop_input(); notcurses_term_dim_yx(nc, &dimy, &dimx); notcurses_stop(nc); if(dimy < MIN_SUPPORTED_ROWS || dimx < MIN_SUPPORTED_COLS){