From d1748031d9a296056f92f9aadc8abe76ae74e7bd Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 10 Jul 2014 20:02:13 +0200 Subject: fixed "play" action when nothing is selected and playback is stopped (bug #1148) --- plugins/gtkui/callbacks.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/gtkui') diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 913a17fb..981e2a63 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -153,6 +153,9 @@ on_playbtn_clicked (GtkButton *button, cur = deadbeef->plt_get_cursor (plt, PL_MAIN); deadbeef->plt_unref (plt); } + if (cur == -1) { + cur = 0; + } deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, cur, 0); } } -- cgit v1.2.3