GNOME Bugzilla – Bug 679444
wacom: gnome-settings-daemon aborts when a screen tablet is plugged in but not enabled
Last modified: 2012-07-05 16:29:30 UTC
gsd_wacom_device_get_display_rotation() (fix for bug 668547, git commit ecb0e2d0) does not check if the crtc returned by gnome_rr_output_get_crtc() is not NULL, which is the case when the output is first connected but not enabled. Note: This fix will be needed in gnome-control-center as well.
Created attachment 218081 [details] [review] Proposed patch Proposed fix
Review of attachment 218081 [details] [review]: ::: plugins/wacom/gsd-wacom-device.c @@ +913,2 @@ rr_output = find_output (rr_screen, device); + if (rr_output == NULL) Would it be simpler to do: if (rr_output) { GnomeRRCrtc *crtc = gnome_rr_output_get_crtc (rr_output); if (crtc) rotation = gnome_rr_crtc_get_current_rotation (crtc); } And leave the rest as-is?
Created attachment 218107 [details] [review] Updated patch That was my first implementation as well, but realized I am no big fan of nested tests so changed it eventually. Admittedly, that one's much simpler though.
Seeing as it's one level deep, and makes the function not use a label, I consider it a win :) Looks good good to commit, thanks!
Cheers! Committed in g-s-d and updated in g-c-c as well commit f682df67fd3689da85f488d6919cb197467ea07c 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