[gnome-color-manager] Fix a crash in gcm-picker when a color sensor is plugged in



commit 2e9043a7a251ca4344f04cae809626e510d55150
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 23 21:04:39 2011 +0100

    Fix a crash in gcm-picker when a color sensor is plugged in

 src/gcm-picker.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index fab40bf..bbb8faa 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -369,6 +369,15 @@ gcm_picker_sensor_client_setup_ui (void)
 	}
 	sensor = g_object_ref (g_ptr_array_index (sensors, 0));
 
+	/* connect to the profile */
+	ret = cd_sensor_connect_sync (sensor, NULL, &error);
+	if (!ret) {
+		g_warning ("failed to connect to sensor: %s",
+			   error->message);
+		g_error_free (error);
+		goto out;
+	}
+
 	if (!cd_sensor_get_native (sensor)) {
 		 /* TRANSLATORS: this is displayed if VTE support is not enabled */
 		gtk_label_set_label (GTK_LABEL (info_bar_hardware_label),



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