diff options
author | waker <wakeroid@gmail.com> | 2009-08-27 20:40:06 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-27 20:40:06 +0200 |
commit | 8c9425b1b18bc8f76f9fad25d56bd4d3466fe1e3 (patch) | |
tree | ac42850f2d5b2d4fcda3743089583e94499c4a32 /playlist.c | |
parent | 931baf241fff9b61010076da7f183db983db11f6 (diff) | |
parent | f66ceea04ef9a373398f0416130b300629405952 (diff) |
Merge branch 'master' into plugins
Conflicts:
playlist.c
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -584,7 +584,7 @@ int pl_set_current (playItem_t *it) { int ret = 0; int from = pl_get_idx_of (playlist_current_ptr); - int to = pl_get_idx_of (it); + int to = it ? pl_get_idx_of (it) : -1; #if 0 // this produces some kind of bug in the beginning of track if (it == playlist_current_ptr) { @@ -617,10 +617,12 @@ pl_set_current (playItem_t *it) { } if (it) { pl_item_copy (&playlist_current, it); + it->played = 1; } codec_unlock (); - it->played = 1; - plug_trigger_event (DB_EV_SONGSTARTED); + if (it) { + plug_trigger_event (DB_EV_SONGSTARTED); + } messagepump_push (M_SONGCHANGED, 0, from, to); return ret; } |