[rhythmbox] metadata: don't try to add NULL strings to dbus messages



commit b35515b85b1f3fda18a6e8f879d257be76e7c140
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Jun 27 18:06:05 2009 +1000

    metadata: don't try to add NULL strings to dbus messages
    
    Stops the metadata helper crashing when it can't identify the media type
    of a file it's reading.

 metadata/rb-metadata-dbus-service.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/metadata/rb-metadata-dbus-service.c b/metadata/rb-metadata-dbus-service.c
index 1907a22..cdecfa5 100644
--- a/metadata/rb-metadata-dbus-service.c
+++ b/metadata/rb-metadata-dbus-service.c
@@ -148,6 +148,9 @@ rb_metadata_dbus_load (DBusConnection *connection,
 	}
 
 	mimetype = rb_metadata_get_mime (svc->metadata);
+	if (mimetype == NULL) {
+		mimetype = "";
+	}
 	has_audio = rb_metadata_has_audio (svc->metadata);
 	has_video = rb_metadata_has_video (svc->metadata);
 	has_other_data = rb_metadata_has_other_data (svc->metadata);



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