[rhythmbox] Fix crasher when MusicBrainz can't read a disc



commit e65be779b4d39161db212e54bc5892f5598c0487
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 10 19:32:31 2009 +0000

    Fix crasher when MusicBrainz can't read a disc
    
    But we can.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=546188

 plugins/audiocd/sj-metadata-musicbrainz3.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/audiocd/sj-metadata-musicbrainz3.c b/plugins/audiocd/sj-metadata-musicbrainz3.c
index 5845e0a..5374399 100644
--- a/plugins/audiocd/sj-metadata-musicbrainz3.c
+++ b/plugins/audiocd/sj-metadata-musicbrainz3.c
@@ -244,6 +244,9 @@ mb_list_albums (SjMetadata *metadata, char **url, GError **error)
   }
 
   priv->disc = mb_read_disc (priv->cdrom);
+  if (priv->disc == NULL) {
+    return NULL;
+
   if (url != NULL) {
     mb_get_submission_url (priv->disc, NULL, 0, buffer, sizeof (buffer));
     *url = g_strdup (buffer);



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