File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3360,17 +3360,20 @@ gboolean
33603360gnome_bg_changes_with_time (GnomeBG * bg )
33613361{
33623362 SlideShow * show ;
3363+ gboolean ret = FALSE;
33633364
33643365 g_return_val_if_fail (bg != NULL , FALSE);
33653366
33663367 if (!bg -> filename )
33673368 return FALSE;
33683369
33693370 show = get_as_slideshow (bg , bg -> filename );
3370- if (show )
3371- return g_queue_get_length (show -> slides ) > 1 ;
3371+ if (show ) {
3372+ ret = g_queue_get_length (show -> slides ) > 1 ;
3373+ g_object_unref (show );
3374+ }
33723375
3373- return FALSE ;
3376+ return ret ;
33743377}
33753378
33763379/**
@@ -3406,8 +3409,10 @@ gnome_bg_create_frame_thumbnail (GnomeBG *bg,
34063409 return NULL ;
34073410
34083411
3409- if (frame_num < 0 || frame_num >= g_queue_get_length (show -> slides ))
3412+ if (frame_num < 0 || frame_num >= g_queue_get_length (show -> slides )) {
3413+ g_object_unref (show );
34103414 return NULL ;
3415+ }
34113416
34123417 i = 0 ;
34133418 skipped = 0 ;
@@ -3424,6 +3429,7 @@ gnome_bg_create_frame_thumbnail (GnomeBG *bg,
34243429 }
34253430 i ++ ;
34263431 }
3432+ g_object_unref (show );
34273433 if (!found )
34283434 return NULL ;
34293435
You can’t perform that action at this time.
0 commit comments