diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-03-12 23:38:24 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-03-12 23:38:24 +0100 |
commit | fc9b1deb56fb26e79788ba97193097923a883a84 (patch) | |
tree | cd2e446f877f566fc5ac935e94e6b792b6dec33a /src/slideshow.c | |
parent | 2abc27e5243cf8d80e0942d14656ccb12cd805de (diff) |
Fix segfault upon unloadable image with --title %h/%w/... (closes GH-35)
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index 5ceee39..a75affd 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -252,10 +252,6 @@ void slideshow_change_image(winwidget winwid, int change) filelist = feh_file_remove_from_list(filelist, last); last = NULL; } - s = slideshow_create_name(FEH_FILE(current_file->data)); - - winwidget_rename(winwid, s); - free(s); if ((winwidget_loadimage(winwid, FEH_FILE(current_file->data))) != 0) { @@ -269,6 +265,11 @@ void slideshow_change_image(winwidget winwid, int change) winwid->im_w = gib_imlib_image_get_width(winwid->im); winwid->im_h = gib_imlib_image_get_height(winwid->im); winwidget_render_image(winwid, 1, 1); + + s = slideshow_create_name(FEH_FILE(current_file->data)); + winwidget_rename(winwid, s); + free(s); + break; } else last = current_file; |