summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-bg.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-11 07:09:20 +0200
committerJasmine Hassan <[email protected]>2012-11-11 19:35:36 +0200
commit3b669aa468a89b273e3b7f7e6efbd9ba2836b772 (patch)
tree4f7b2b3b974834175d3c4d29d842d218fc7ddd1e /libmate-desktop/mate-bg.c
parentbba859372d7035ccc7d67e846321d7ccc0742a6d (diff)
downloadmate-desktop-3b669aa468a89b273e3b7f7e6efbd9ba2836b772.tar.bz2
mate-desktop-3b669aa468a89b273e3b7f7e6efbd9ba2836b772.tar.xz
[mate-bg] don't try to use a null format
upstream commit: http://git.gnome.org/browse/gnome-desktop/commit/?id=9a2c931869214d5113e3c9246cc36c094bd211fe "introduced a bug that would cause a warning to spew in gnome-screensaver" http://git.gnome.org/browse/gnome-desktop/commit/?id=f2a6d5ea97b98ea3b1d36bb1de83f3bfc92c5c73
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-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 ||