From 6f9649e9c574e89989fd91333e915695550a15ab Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 8 Nov 2014 01:53:43 +0100 Subject: Avoid a possible crash When the spice client goes to fullscreen it (temporarily) turns all xrandr outputs off (for some reason). This causes gnome-settings-daemon to crash (and respawn and reset the old screen size) due to a NULL deref in libgnome-desktop. Based on gnome-desktop commit: b8849c08adb1ba1b55d1a3511dd9eefd00504dc0 Patch by: Alex Larsson Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=646714 --- libmate-desktop/mate-rr-config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmate-desktop/mate-rr-config.c b/libmate-desktop/mate-rr-config.c index bab0716..5702b11 100644 --- a/libmate-desktop/mate-rr-config.c +++ b/libmate-desktop/mate-rr-config.c @@ -1233,7 +1233,8 @@ mate_rr_config_ensure_primary (MateRRConfig *configuration) if (!found) { if (laptop != NULL) { laptop->priv->primary = TRUE; - } else { + } else if (top_left != NULL) { + /* Note: top_left can be NULL if all outputs are off */ top_left->priv->primary = TRUE; } } -- cgit v1.2.1