Thu Nov 30 09:55:42 2006 John Ellis <johne@verizon.net>
authorJohn Ellis <johne@verizon.net>
Thu, 30 Nov 2006 14:58:27 +0000 (14:58 +0000)
committerJohn Ellis <johne@verizon.net>
Thu, 30 Nov 2006 14:58:27 +0000 (14:58 +0000)
        * slideshow.c (real_slideshow_start): Fix memory leak when unable to
        begin a slideshow.

ChangeLog
TODO
src/slideshow.c

index feb4929..fd3bf1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 30 09:55:42 2006  John Ellis  <johne@verizon.net>
+
+       * slideshow.c (real_slideshow_start): Fix memory leak when unable to
+       begin a slideshow.
+
 Wed Nov 29 22:53:03 2006  John Ellis  <johne@verizon.net>
 
        * image-overlay.[ch]: Prepare for icon notification display, and fix
diff --git a/TODO b/TODO
index b9c4627..c96b27b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -117,7 +117,9 @@ d> figure out if crash when expanding a folder in the folder tree view when pess
 Minor (non blockers):
 ----------------------------------------------
 
- > fix gtk_table_attach use to not use FALSE for fill vertical arg.
+d> fix memory leak in real_slideshow_start() when slideshow_step fails.
+
+d> fix gtk_table_attach use to not use FALSE for fill vertical arg.
 
  > xv and xpaint are hardly used or even installed by any distro anymore - time
    to remove these (and find alternates?) seems silly to only have gimp.
index ab25ce6..2e6a6e7 100644 (file)
@@ -336,11 +336,9 @@ static SlideShowData *real_slideshow_start(ImageWindow *imd, LayoutWindow *lw,
 
        ss->from_selection = FALSE;
 
-       ss->stop_func = stop_func;
-       ss->stop_data = stop_data;
+       ss->stop_func = NULL;
 
        ss->timeout_id = -1;
-
        ss->paused = FALSE;
 
        if (ss->path_list)
@@ -382,9 +380,13 @@ static SlideShowData *real_slideshow_start(ImageWindow *imd, LayoutWindow *lw,
        if (slideshow_step(ss, TRUE))
                {
                slideshow_timer_reset(ss, TRUE);
+
+               ss->stop_func = stop_func;
+               ss->stop_data = stop_data;
                }
        else
                {
+               slideshow_free(ss);
                ss = NULL;
                }