summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-07-15 09:31:45 +0200
committerBastien Nocera <hadess@hadess.net>2015-07-15 10:58:39 +0200
commit64767da0e3ca8547f968b703ffda1716336a6bd0 (patch)
tree838cf113e99cd33ab0d8e28f36cf53c673ef6b08 /src
parent048ad86e6ee1763d799a6f3dff8e6f65884b3006 (diff)
downloadgrilo-plugins-64767da0e3ca8547f968b703ffda1716336a6bd0.tar.gz
magnatune: Fix search never finishing if no results
When no results are returned from a search, we'd skip to the error path, but without an error to return. Thus, we'd never mark the search operation as finished. https://bugzilla.gnome.org/show_bug.cgi?id=751890
Diffstat (limited to 'src')
-rw-r--r--src/magnatune/grl-magnatune.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/magnatune/grl-magnatune.c b/src/magnatune/grl-magnatune.c
index d2ce7b0..deb62e0 100644
--- a/src/magnatune/grl-magnatune.c
+++ b/src/magnatune/grl-magnatune.c
@@ -920,10 +920,15 @@ magnatune_execute_search(OperationSpec *os)
g_list_free(list_medias);
+ g_slice_free(OperationSpec, os);
+ return;
+
end_search:
if (err != NULL) {
os->callback(os->source, os->operation_id, NULL, 0, os->user_data, err);
g_error_free(err);
+ } else {
+ os->callback(os->source, os->operation_id, NULL, 0, os->user_data, NULL);
}
g_slice_free(OperationSpec, os);