[nautilus] Don't use wallpaper surface if it NULL



commit c9be986083b81067572d0408d5d7e6c750aba061
Author: William Jon McCann <jmccann redhat com>
Date:   Sat Jul 21 02:12:09 2012 -0400

    Don't use wallpaper surface if it NULL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680356

 libnautilus-private/nautilus-desktop-background.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-background.c b/libnautilus-private/nautilus-desktop-background.c
index d262594..f7b4312 100644
--- a/libnautilus-private/nautilus-desktop-background.c
+++ b/libnautilus-private/nautilus-desktop-background.c
@@ -261,8 +261,9 @@ on_fade_finished (GnomeBGCrossfade *fade,
         NautilusDesktopBackground *self = user_data;
 
 	nautilus_desktop_background_ensure_realized (self);
-	gnome_bg_set_surface_as_root (gdk_window_get_screen (window),
-                                      self->details->background_surface);
+	if (self->details->background_surface != NULL)
+		gnome_bg_set_surface_as_root (gdk_window_get_screen (window),
+					      self->details->background_surface);
 }
 
 static gboolean
@@ -303,6 +304,9 @@ nautilus_desktop_background_set_up_widget (NautilusDesktopBackground *self)
 	}
 
 	nautilus_desktop_background_ensure_realized (self);
+	if (self->details->background_surface == NULL)
+		return;
+
         window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
 
 	in_fade = fade_to_surface (self, window,



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