aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-17 12:07:32 +0200
committerMax Kellermann <max@duempel.org>2008-09-17 12:07:32 +0200
commite7e9bcbe5f33eb13e14a2b053643b0de33892757 (patch)
tree0631b1784974f39d3c2c94eba859b341fbe93dec /src/screen.c
parentea1ec45e42791efa169ae0ed81a7ea8e1ebad69e (diff)
downloadmpd-e7e9bcbe5f33eb13e14a2b053643b0de33892757.tar.gz
mpd-e7e9bcbe5f33eb13e14a2b053643b0de33892757.tar.xz
mpd-e7e9bcbe5f33eb13e14a2b053643b0de33892757.zip
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.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index 034855702..339525523 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();