[Xfce4-commits] <xfdesktop:master> Fix a crash when removing displays

Eric Koegel noreply at xfce.org
Wed Feb 26 10:46:01 CET 2014


Updating branch refs/heads/master
         to 22fd6840660e5154a7051647051deefea90bfe27 (commit)
       from 36387ed6c75662a42d822d32029e425ae73a556d (commit)

commit 22fd6840660e5154a7051647051deefea90bfe27
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Wed Feb 26 12:43:02 2014 +0300

    Fix a crash when removing displays
    
    When a screen is extended to the right and then changed to mirrored
    this can cause xfdesktop to crash. This patch does a sanity check
    to ensure there is a backdrop when the backdrop_changed_cb is
    called.

 src/xfce-desktop.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 9be8504..53be20e 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -367,7 +367,10 @@ backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
     TRACE("entering");
     
     g_return_if_fail(XFCE_IS_DESKTOP(desktop));
-    
+
+    if(!XFCE_IS_BACKDROP(backdrop))
+        return;
+
     if(desktop->priv->updates_frozen || !gtk_widget_get_realized(GTK_WIDGET(desktop)))
         return;
 


More information about the Xfce4-commits mailing list