summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui/gtkui.c')
-rw-r--r--plugins/gtkui/gtkui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index f2c6d30d..7700e20f 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -904,13 +904,16 @@ gtkui_add_new_playlist (void) {
else {
snprintf (name, sizeof (name), _("New Playlist (%d)"), idx);
}
+ deadbeef->plt_lock ();
for (i = 0; i < cnt; i++) {
char t[100];
- deadbeef->plt_get_title (i, t, sizeof (t));
+ void *plt = deadbeef->plt_get_handle (i);
+ deadbeef->plt_get_title (plt, t, sizeof (t));
if (!strcasecmp (t, name)) {
break;
}
}
+ deadbeef->plt_unlock ();
if (i == cnt) {
return deadbeef->plt_add (cnt, name);
}