Code

screen: before calling update(), check if it is defined
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:06:05 +0000 (12:06 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:06:05 +0000 (12:06 +0200)
That seems to be a fn->paint was checked, then the code called
fn->update().  Fix this.

src/screen.c

index c8e151fa1edb2d0ec54c533af6a9cbb42d19a6b7..5adf31c93c15e66d5599c467369485470524d7a5 100644 (file)
@@ -746,7 +746,7 @@ screen_update(mpdclient_t *c)
                paint_top_window("", c, 0);
 
        /* update the main window */
-       if (mode_fn && mode_fn->paint)
+       if (mode_fn && mode_fn->update != NULL)
                mode_fn->update(screen, c);
 
        /* update progress window */