[gnome-control-center/gnome-3-14] background: Fix crash when choosing background due to missing icon



commit de928cb9fc5d39def459cab1c1878fb0e4ced1d5
Author: Marek Chalupa <mchqwerty gmail com>
Date:   Fri Jan 9 17:52:26 2015 +0100

    background: Fix crash when choosing background due to missing icon
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742656

 panels/background/cc-background-item.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index d0687ef..9d9c37c 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -112,6 +112,12 @@ get_emblemed_pixbuf (CcBackgroundItem *item, GdkPixbuf *pixbuf, gint scale_facto
                                                                               scale_factor,
                                                                               GTK_ICON_LOOKUP_FORCE_SIZE |
                                                                               GTK_ICON_LOOKUP_USE_BUILTIN);
+                        if (icon_info == NULL) {
+                                g_warning ("Your icon theme is missing the slideshow-emblem icon, "
+                                           "please file a bug against it");
+                                goto out;
+                        }
+
                         slideshow_emblem = gtk_icon_info_load_icon (icon_info, &error);
                         if (slideshow_emblem == NULL) {
                                 g_warning ("Failed to load slideshow emblem: %s", error->message);


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