[gnome-color-manager] Do not crash when GetProfileForWindow() succeeds to find a window
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Do not crash when GetProfileForWindow() succeeds to find a window
- Date: Thu, 25 Mar 2010 15:57:18 +0000 (UTC)
commit ef5e5d4779a170b97ed86c8883767eae34723fe6
Author: Richard Hughes <richard hughsie com>
Date: Thu Mar 25 15:56:11 2010 +0000
Do not crash when GetProfileForWindow() succeeds to find a window
src/gcm-client.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 8313488..2ba44ec 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -484,7 +484,6 @@ gcm_client_get_device_by_window (GcmClient *client, GdkWindow *window)
GnomeRROutput *output_best = NULL;
GnomeRROutput **outputs;
GcmDevice *device = NULL;
- gchar *id = NULL;
/* get the window parameters, in root co-ordinates */
gdk_window_get_origin (window, &window_x, &window_y);
@@ -541,9 +540,8 @@ out:
device_tmp = gcm_device_xrandr_new ();
gcm_device_xrandr_set_from_output (device_tmp, output_best, NULL);
device = gcm_client_get_device_by_id (client, gcm_device_get_id (device_tmp));
- g_free (device_tmp);
+ g_object_unref (device_tmp);
}
- g_free (id);
return device;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]