Code

screen: close only current screen in screen_exit()
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:07:32 +0000 (12:07 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:07:32 +0000 (12:07 +0200)
Screens which are not active have already been closed, or have never
been opened.  Don't call close again on them.

src/screen.c

index 034855702475916311327b036615624b439f2497..3395255233ae9d4f3c7484448a18d8ab208f50ff 100644 (file)
@@ -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();