summaryrefslogtreecommitdiff
path: root/plugins/mpgmad
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r--plugins/mpgmad/mpgmad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 0e06bbeb..132adebc 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -1364,10 +1364,10 @@ cmp3_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet");
if (cuesheet) {
DB_playItem_t *last = deadbeef->plt_insert_cue_from_buffer (plt, after, it, cuesheet, strlen (cuesheet), buffer.totalsamples-buffer.delay-buffer.padding, buffer.samplerate);
- deadbeef->pl_unlock ();
if (last) {
deadbeef->pl_item_unref (it);
deadbeef->pl_item_unref (last);
+ deadbeef->pl_unlock ();
return last;
}
}