diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-06 20:10:37 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-06 20:10:37 +0200 |
commit | e264613a4ac1b7be3d5ab265a3041f57a709750f (patch) | |
tree | b3a61b5cf5341cb9ec022e621f5152bc225bad4b | |
parent | 502e1c9a4563af66178b5d4d66345741e2b3c24f (diff) |
Thumbnail mode: Fix segfault when opening a deleted/renamed file
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/events.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +git HEAD + + * Fix segfault in Thumbnail mode when trying to open a no longer + existing image (e.g. when the file was renamed by a previous action) + Sat Jun 5 21:35:25 CEST 2010 Daniel Friesel <derf@chaosdorf.de * Release v1.6.1 diff --git a/src/events.c b/src/events.c index b850497..b0e9862 100644 --- a/src/events.c +++ b/src/events.c @@ -251,7 +251,8 @@ static void feh_event_handle_ButtonRelease(XEvent * ev) thumbwin = winwidget_create_from_file( gib_list_add_front(NULL, thumbfile), s, WIN_TYPE_THUMBNAIL_VIEWER); - winwidget_show(thumbwin); + if (thumbwin) + winwidget_show(thumbwin); } else if (FEH_FILE(thumbwin->file->data) != thumbfile) { free(thumbwin->file); thumbwin->file = gib_list_add_front(NULL, thumbfile); |