[sound-juicer] Don't double-free errors from the metadata getter



commit ecfc64b813d41afc636ff2d33a0f41023dcc8ed3
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 24 16:19:02 2009 +0000

    Don't double-free errors from the metadata getter

 libjuicer/sj-metadata-getter.h |    2 +-
 src/sj-main.c                  |    1 -
 tests/mb-test.c                |    2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libjuicer/sj-metadata-getter.h b/libjuicer/sj-metadata-getter.h
index 7aed0f8..621dc15 100644
--- a/libjuicer/sj-metadata-getter.h
+++ b/libjuicer/sj-metadata-getter.h
@@ -46,7 +46,7 @@ struct _SjMetadataGetterClass
   GObjectClass parent;
 
   /* Signals */
-  void         (*metadata) (SjMetadataGetter *mdg, GList *albums, GError *error);
+  void         (*metadata) (SjMetadataGetter *mdg, GList *albums, const GError *error);
 };
 
 GType sj_metadata_getter_get_type (void);
diff --git a/src/sj-main.c b/src/sj-main.c
index bc5e53c..d739fc4 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -816,7 +816,6 @@ metadata_cb (SjMetadataGetter *m, GList *albums, GError *error)
     gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
     gtk_dialog_run (GTK_DIALOG (dialog));
     gtk_widget_destroy (dialog);
-    g_error_free (error);
     update_ui_for_album (NULL);
     return;
   }
diff --git a/tests/mb-test.c b/tests/mb-test.c
index 0361f81..e9d62eb 100644
--- a/tests/mb-test.c
+++ b/tests/mb-test.c
@@ -41,7 +41,7 @@ release_type_to_id (const char *type)
 }
 
 static void
-metadata_cb (SjMetadataGetter *metadata, GList *albums, GError *error)
+metadata_cb (SjMetadataGetter *metadata, GList *albums, const GError *error)
 {
   char *url;
 



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