From ab3fd6e0232cc8cbcb5eb135f03fe96755d43587 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 9 May 2011 19:52:44 +0200 Subject: fixed seeking with global hotkeys crash when paused --- plugins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins.c') diff --git a/plugins.c b/plugins.c index 44f83039..ec0f26a2 100644 --- a/plugins.c +++ b/plugins.c @@ -400,7 +400,7 @@ plugin_t *plugins_tail; float plug_playback_get_pos (void) { playItem_t *trk = streamer_get_playing_track (); - float dur = pl_get_item_duration (trk); + float dur = trk ? pl_get_item_duration (trk) : -1; if (!trk || dur <= 0) { if (trk) { pl_item_unref (trk); @@ -416,7 +416,7 @@ plug_playback_get_pos (void) { void plug_playback_set_pos (float pos) { playItem_t *trk = streamer_get_playing_track (); - float dur = pl_get_item_duration (trk); + float dur = trk ? pl_get_item_duration (trk) : -1; if (!trk || dur <= 0) { if (trk) { pl_item_unref (trk); -- cgit v1.2.3