aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_play.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
committerMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
commite6d6231b4de336f60bc5b07331e2f1f01096c66c (patch)
treeca99bb77e967d794af8b88aebd3fdf9c50dc474b /src/screen_play.c
parent07632841df4ff1d8fcfac33bd93e06ee43a4498e (diff)
downloadmpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.gz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.xz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.zip
screen: moved list_window mouse code to list_window.c
Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed.
Diffstat (limited to 'src/screen_play.c')
-rw-r--r--src/screen_play.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen_play.c b/src/screen_play.c
index cd43982c3..11d475478 100644
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -422,7 +422,8 @@ handle_mouse_event(mpd_unused screen_t *screen, mpdclient_t *c)
unsigned selected;
unsigned long bstate;
- if (screen_get_mouse_event(c, lw, c->playlist.list->len, &bstate, &row))
+ if (screen_get_mouse_event(c, &bstate, &row) ||
+ list_window_mouse(lw, c->playlist.list->len, bstate, row))
return 1;
if (bstate & BUTTON1_DOUBLE_CLICKED) {