summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmate-desktop/mate-bg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index 3cae227..a02eb95 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -1758,9 +1758,12 @@ get_as_pixbuf_for_size (MateBG *bg,
/* If scalable choose maximum size */
format = gdk_pixbuf_get_file_info (filename, NULL, NULL);
- if (format != NULL)
- tmp = gdk_pixbuf_format_get_name (format);
- if (format != NULL &&
+ if (format != NULL) {
+ tmp = gdk_pixbuf_format_get_name (format);
+ } else {
+ tmp = NULL;
+ }
+ if (tmp != NULL &&
g_strcmp0 (tmp, "svg") == 0 &&
(best_width > 0 && best_height > 0) &&
(bg->placement == MATE_BG_PLACEMENT_FILL_SCREEN ||