summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-08 01:53:43 +0100
committerinfirit <[email protected]>2014-11-28 08:51:51 +0100
commit6f9649e9c574e89989fd91333e915695550a15ab (patch)
tree2dc674a42af601adbde0a4f4683e7f8e2fc1bd19
parentece3dc98d3da07d8484f4aeb330e809029f1a4d8 (diff)
downloadmate-desktop-6f9649e9c574e89989fd91333e915695550a15ab.tar.bz2
mate-desktop-6f9649e9c574e89989fd91333e915695550a15ab.tar.xz
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
-rw-r--r--libmate-desktop/mate-rr-config.c3
1 files changed, 2 insertions, 1 deletions
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;
}
}