[gnome-color-manager] trivial: fix up two bugs with the new DDC/CI code



commit c4191ae466021ad9be213eede408b3a4a1122d21
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 10 15:42:50 2010 +0100

    trivial: fix up two bugs with the new DDC/CI code

 libcolor-glib/gcm-ddc-client.c |    2 +-
 tools/gcm-ddc-util.c           |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libcolor-glib/gcm-ddc-client.c b/libcolor-glib/gcm-ddc-client.c
index 2d8d3d5..d5373bf 100644
--- a/libcolor-glib/gcm-ddc-client.c
+++ b/libcolor-glib/gcm-ddc-client.c
@@ -232,7 +232,7 @@ gcm_ddc_client_get_device_from_edid (GcmDdcClient *client, const gchar *edid_md5
 
 		/* matches? */
 		if (g_strcmp0 (edid_md5, edid_md5_tmp) == 0) {
-			device = device_tmp;
+			device = g_object_ref (device_tmp);
 			break;
 		}
 	}
diff --git a/tools/gcm-ddc-util.c b/tools/gcm-ddc-util.c
index 136f331..1161ffc 100644
--- a/tools/gcm-ddc-util.c
+++ b/tools/gcm-ddc-util.c
@@ -247,6 +247,7 @@ main (int argc, char **argv)
 	if (control_name == NULL) {
 		g_print ("you need to specify a control name with --control\n");
 		show_device (device);
+		goto out;
 	}
 	idx = gcm_get_vcp_index_from_description (control_name);
 	if (idx == GCM_VCP_ID_INVALID) {



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