From e7e9bcbe5f33eb13e14a2b053643b0de33892757 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Sep 2008 12:07:32 +0200 Subject: 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. --- src/screen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/screen.c') 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(); -- cgit v1.2.3