summaryrefslogtreecommitdiff
path: root/src/totem-grilo.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-03-14 14:13:16 +0100
committerBastien Nocera <hadess@hadess.net>2014-03-14 14:13:16 +0100
commitaeafb7619e62214ba51ab7548cec145d871d0804 (patch)
tree1060d20a94c30a916591e94c082ef163fc89aeec /src/totem-grilo.c
parente17070ed32bb7be9bec42d0c5a9dfcc0b470ff56 (diff)
downloadtotem-aeafb7619e62214ba51ab7548cec145d871d0804.tar.gz
main: Fix error handling when deleting items
First, the check for success when removing using grilo was reversed, then the success variable could be used unassigned when no URI was set for a particular GrlMedia.
Diffstat (limited to 'src/totem-grilo.c')
-rw-r--r--src/totem-grilo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index e02b8a4dc..d0afbab8d 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -2054,12 +2054,13 @@ delete_foreach (gpointer data,
g_debug ("Removing item '%s' through Grilo",
grl_media_get_id (media));
grl_source_remove_sync (source, media, &error);
- success = (error != NULL);
+ success = (error == NULL);
} else {
const char *uri;
uri = grl_media_get_url (media);
if (!uri) {
+ success = FALSE;
g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
"Item cannot be removed through Grilo and doesn't have a URI, please file a bug");
} else {