summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-bg.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-07 19:50:19 +0200
committerStefano Karapetsas <[email protected]>2012-09-07 19:50:19 +0200
commit30c1864d771fbf555e255a50a1681f74cdb707af (patch)
tree3ce0891fc85f70bb038d0cc074f1d835ffb79166 /libmate-desktop/mate-bg.c
parent225d5d27e766f88f642516d93b406f4624df57dc (diff)
downloadmate-desktop-30c1864d771fbf555e255a50a1681f74cdb707af.tar.bz2
mate-desktop-30c1864d771fbf555e255a50a1681f74cdb707af.tar.xz
avoid format=NULL assertion warning
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-rw-r--r--libmate-desktop/mate-bg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index d2a373b..0aa62c7 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -1693,7 +1693,8 @@ get_as_pixbuf_for_size (MateBG *bg,
/* If scalable choose maximum size */
format = gdk_pixbuf_get_file_info (filename, NULL, NULL);
- tmp = gdk_pixbuf_format_get_name (format);
+ if (format != NULL)
+ tmp = gdk_pixbuf_format_get_name (format);
if (format != NULL &&
strcmp (tmp, "svg") == 0 &&
(best_width > 0 && best_height > 0) &&