From: Max Kellermann Date: Wed, 17 Sep 2008 10:07:32 +0000 (+0200) Subject: screen: close only current screen in screen_exit() X-Git-Tag: v0.12_alpha1~276 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e7e9bcbe5f33eb13e14a2b053643b0de33892757;p=ncmpc.git screen: close only current screen in screen_exit() Screens which are not active have already been closed, or have never been opened. Don't call close again on them. --- diff --git a/src/screen.c b/src/screen.c index 0348557..3395255 100644 --- a/src/screen.c +++ b/src/screen.c @@ -421,13 +421,14 @@ screen_exit(void) endwin(); + if (mode_fn->close != NULL) + mode_fn->close(); + /* close and exit all screens (playlist,browse,help...) */ i=0; while (screens[i].functions) { const struct screen_functions *sf = screens[i].functions; - if (sf->close) - sf->close(); if (sf->exit) sf->exit();