[gnome-color-manager] Fix a critical warning in gcm-picker when CUPS printers are installed



commit 0eaf8441716ba5fb56f1052d6d183692c8d975c3
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 23 21:03:31 2011 +0100

    Fix a critical warning in gcm-picker when CUPS printers are installed

 src/gcm-picker.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 25dad29..fab40bf 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -567,6 +567,11 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 			goto out;
 		}
 
+		/* is a printer profile */
+		filename = cd_profile_get_filename (profile);
+		if (filename == NULL)
+			continue;
+
 		/* only for correct kind */
 		has_vcgt = cd_profile_get_has_vcgt (profile);
 		has_colorspace_description = gcm_profile_has_colorspace_description (profile);
@@ -576,7 +581,6 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 			gcm_prefs_combobox_add_profile (widget, profile, &iter);
 
 			/* set active option */
-			filename = cd_profile_get_filename (profile);
 			if (g_strcmp0 (filename, profile_filename) == 0)
 				gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &iter);
 			has_profile = TRUE;



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