[gnome-color-manager] trivial: fix a crash when trying to profile a non-internal panel



commit 15968af4975543fbd81805a9ca2868f024bcce7b
Author: Richard Hughes <richard hughsie com>
Date:   Thu Mar 25 22:22:07 2010 +0000

    trivial: fix a crash when trying to profile a non-internal panel

 src/gcm-calibrate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 24258b4..02fdf09 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -259,6 +259,7 @@ gcm_calibrate_set_basename (GcmCalibrate *calibrate)
 gboolean
 gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GError **error)
 {
+	gboolean lcd_internal;
 	gboolean ret = TRUE;
 	const gchar *native_device = NULL;
 	const gchar *manufacturer = NULL;
@@ -278,8 +279,8 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 	/* if we're a laptop, maybe use the dmi data instead */
 	if (kind == GCM_DEVICE_KIND_DISPLAY) {
 		native_device = gcm_device_xrandr_get_native_device (GCM_DEVICE_XRANDR (device));
-		ret = gcm_utils_output_is_lcd_internal (native_device);
-		if (ret) {
+		lcd_internal = gcm_utils_output_is_lcd_internal (native_device);
+		if (lcd_internal) {
 			model = gcm_dmi_get_name (priv->dmi);
 			manufacturer = gcm_dmi_get_vendor (priv->dmi);
 		}



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