[gnome-color-manager] Handle a critical warning where there is no crtc for the output, although it's connected
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Handle a critical warning where there is no crtc for the output, although it's connected
- Date: Thu, 5 Nov 2009 12:03:15 +0000 (UTC)
commit 833dd7b175e0fe8b32287de5adf5826f13391ad5
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 5 12:01:55 2009 +0000
Handle a critical warning where there is no crtc for the output, although it's connected
src/gcm-utils.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index 4307da9..17b1df0 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -209,6 +209,12 @@ gcm_utils_set_gamma_for_device (GcmDevice *device, GError **error)
/* get crtc size */
crtc = gnome_rr_output_get_crtc (output);
+ if (crtc == NULL) {
+ if (error != NULL)
+ *error = g_error_new (1, 0, "failed to get crtc for device: %s", id);
+ goto out;
+ }
+
size = gcm_utils_get_gamma_size (crtc, error);
if (size == 0)
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]