From 8cd361027c86a37c73eb8f787a88eda701d0fa4d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 2 Nov 2011 16:49:07 +0000 Subject: [PATCH] color: Set model and vendor to 'unknown' if not specified or unavailable If the user has connected a device without the ability to get the EDID (e.g. composite TV connection) then don't show a critical warning and fail to add the device. Resolves https://bugzilla.redhat.com/show_bug.cgi?id=749504 --- plugins/color/gsd-color-manager.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c index 01b20c0..2474040 100644 --- a/plugins/color/gsd-color-manager.c +++ b/plugins/color/gsd-color-manager.c @@ -1263,6 +1263,12 @@ gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output) if (serial == NULL) serial = "unknown"; + /* ensure mandatory fields are set */ + if (model == NULL) + model = "unknown"; + if (vendor == NULL) + vendor = "unknown"; + device_id = gcm_session_get_output_id (manager, output); g_debug ("output %s added", device_id); device_props = g_hash_table_new_full (g_str_hash, g_str_equal, -- 1.7.8