[gnome-settings-daemon] wacom: check if crtc is valid when querying rotation



commit f682df67fd3689da85f488d6919cb197467ea07c
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Thu Jul 5 15:17:10 2012 +0200

    wacom: check if crtc is valid when querying rotation
    
    The value returned by gnome_rr_crtc_get_current_rotation()
    can be NULL if the output is not enabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679444

 plugins/wacom/gsd-wacom-device.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 0d865cc..fad3e63 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -912,7 +912,8 @@ gsd_wacom_device_get_display_rotation (GsdWacomDevice *device)
 	rr_output = find_output (rr_screen, device);
 	if (rr_output) {
 		GnomeRRCrtc *crtc = gnome_rr_output_get_crtc (rr_output);
-		rotation = gnome_rr_crtc_get_current_rotation (crtc);
+		if (crtc)
+			rotation = gnome_rr_crtc_get_current_rotation (crtc);
 	}
 	g_object_unref (rr_screen);
 



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