[rhythmbox] don't crash when looking at the 'copy' encoding profile (bug #657185)



commit 8ff760e4500dd22c44907b71b5c38b369d0e39a0
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Aug 26 08:58:38 2011 +1000

    don't crash when looking at the 'copy' encoding profile (bug #657185)

 shell/rb-track-transfer-batch.c |    3 ++-
 shell/rb-track-transfer-queue.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/shell/rb-track-transfer-batch.c b/shell/rb-track-transfer-batch.c
index bb4a05c..c26eadf 100644
--- a/shell/rb-track-transfer-batch.c
+++ b/shell/rb-track-transfer-batch.c
@@ -234,7 +234,8 @@ rb_track_transfer_batch_check_profiles (RBTrackTransferBatch *batch, GList **mis
 		GstEncodingProfile *profile = GST_ENCODING_PROFILE (l->data);
 		char *profile_media_type;
 		profile_media_type = rb_gst_encoding_profile_get_media_type (profile);
-		if ((rb_gst_media_type_is_lossless (profile_media_type) == FALSE) &&
+		if (profile_media_type != NULL &&
+		    (rb_gst_media_type_is_lossless (profile_media_type) == FALSE) &&
 		    rb_encoder_get_missing_plugins (encoder, profile, NULL, NULL)) {
 			batch->priv->missing_plugin_profiles = g_list_append (batch->priv->missing_plugin_profiles, profile);
 		}
diff --git a/shell/rb-track-transfer-queue.c b/shell/rb-track-transfer-queue.c
index 4f8700b..c2e7e12 100644
--- a/shell/rb-track-transfer-queue.c
+++ b/shell/rb-track-transfer-queue.c
@@ -336,7 +336,8 @@ missing_encoder_response_cb (GtkDialog *dialog, gint response, RBTrackTransferQu
 			GstEncodingProfile *profile = GST_ENCODING_PROFILE (l->data);
 			char *profile_media_type;
 			profile_media_type = rb_gst_encoding_profile_get_media_type (profile);
-			if ((rb_gst_media_type_is_lossless (profile_media_type) == FALSE) &&
+			if (profile_media_type != NULL &&
+			    (rb_gst_media_type_is_lossless (profile_media_type) == FALSE) &&
 			    rb_encoder_get_missing_plugins (encoder, profile, NULL, NULL)) {
 				profiles = g_list_append (profiles, profile);
 			}



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