summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2010-09-30 01:07:50 -0400
committerRay Strode <rstrode@redhat.com>2010-09-30 01:07:50 -0400
commitf2a6d5ea97b98ea3b1d36bb1de83f3bfc92c5c73 (patch)
treee7e039bdbd86f3eabd77e5876930b490efbaa8c8
parentc5e5db705ee982e3cc0761a7c83235798d8428bd (diff)
downloadgnome-desktop-f2a6d5ea97b98ea3b1d36bb1de83f3bfc92c5c73.tar.gz
gnome-bg: don't try to use a null format
commit 9a2c931869214d5113e3c9246cc36c094bd211fe introduced a bug that would cause a warning to spew in gnome-screensaver.
-rw-r--r--libgnome-desktop/gnome-bg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index 7629ef38..caba34da 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -1676,8 +1676,14 @@ get_as_pixbuf_for_size (GnomeBG *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 &&
+
+ if (format != NULL) {
+ tmp = gdk_pixbuf_format_get_name (format);
+ } else {
+ tmp = NULL;
+ }
+
+ if (tmp != NULL &&
strcmp (tmp, "svg") == 0 &&
(best_width > 0 && best_height > 0) &&
(bg->placement == GNOME_BG_PLACEMENT_FILL_SCREEN ||