summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-bg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index e511975..62cc5e5 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -3197,9 +3197,13 @@ mate_bg_changes_with_time (MateBG *bg)
if (!bg->filename)
return FALSE;
- show = get_as_slideshow (bg, bg->filename);
- if (show)
- return g_queue_get_length (show->slides) > 1;
+ if ((show = get_as_slideshow (bg, bg->filename)) != NULL) {
+ gboolean result;
+
+ result = (g_queue_get_length (show->slides) > 1) ? TRUE : FALSE;
+ slideshow_unref (show);
+ return result;
+ }
return FALSE;
}