[grilo-plugins] magnatune: Fix search never finishing if no results



commit 64767da0e3ca8547f968b703ffda1716336a6bd0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jul 15 09:31:45 2015 +0200

    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

 src/magnatune/grl-magnatune.c |    5 +++++
 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]