summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-04-27 22:35:51 +0200
committerGravatar waker <wakeroid@gmail.com>2011-04-27 22:35:51 +0200
commitb0056315995cd409172da826951f1855a4a9f391 (patch)
treed9c82f862516b8b8ea831c5bc13c53c2c6cca5ce /plugins/gtkui/gtkui.c
parent2ea47db0e711301d520334c010e73ce161ba48f9 (diff)
added few pl_add_files_begin error checks to gtkui
Diffstat (limited to 'plugins/gtkui/gtkui.c')
-rw-r--r--plugins/gtkui/gtkui.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 0759497a..ae785fce 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -809,10 +809,11 @@ on_add_location_activate (GtkMenuItem *menuitem,
if (entry) {
const char *text = gtk_entry_get_text (entry);
if (text) {
- deadbeef->pl_add_files_begin (deadbeef->plt_get_curr ());
- deadbeef->pl_add_file (text, NULL, NULL);
- deadbeef->pl_add_files_end ();
- playlist_refresh ();
+ if (!deadbeef->pl_add_files_begin (deadbeef->plt_get_curr ())) {
+ deadbeef->pl_add_file (text, NULL, NULL);
+ deadbeef->pl_add_files_end ();
+ playlist_refresh ();
+ }
}
}
}