[rhythmbox] ext-db: don't crash if converting the encoded value fails



commit 0149adf19c7fc725a45d52b43ba8a1eb8a7e69b0
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Oct 14 19:17:03 2012 +1000

    ext-db: don't crash if converting the encoded value fails

 metadata/rb-ext-db.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/metadata/rb-ext-db.c b/metadata/rb-ext-db.c
index 01ee0a0..63c8f7b 100644
--- a/metadata/rb-ext-db.c
+++ b/metadata/rb-ext-db.c
@@ -870,7 +870,11 @@ do_store_request (GSimpleAsyncResult *result, GObject *object, GCancellable *can
 		 * pass it out to metadata consumers
 		 */
 		g_signal_emit (store, signals[LOAD], 0, req->data, &req->value);
-		rb_debug ("converted encoded data into value of type %s", G_VALUE_TYPE_NAME (req->value));
+		if (req->value != NULL) {
+			rb_debug ("converted encoded data into value of type %s", G_VALUE_TYPE_NAME (req->value));
+		} else {
+			rb_debug ("failed to convert encoded data");
+		}
 	} else if (req->value != NULL) {
 		/* we got an object representing the data; store it so we
 		 * can write it to a file



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