From 2c2e0f477a0fb9524235c90f9f7140e60e97319c Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Tue, 11 Aug 2015 23:21:37 +0100 Subject: [PATCH] NULL-ptr crash in image_read_ahead_done_cb() It's not easy to reproduce, but if one is mad and follows the steps and presses the keys a few dozens times, there's a slight chance one can trigger it. Not much to investigate it further. Forwarding from Sami Farin 2015-08-07 16:40:44 EDT: | to reproduce: quickly keep pressing f (fullscreen) and page down | (next file) keys. | | attached patch is a kind of workaround, I did not inspect further | is this threading issue etc Full backtrace: https://bugzilla.redhat.com/attachment.cgi?id=1027647 Patch: https://bugzilla.redhat.com/attachment.cgi?id=1060482&action=diff&context=patch&collapsed=&headers=1&format=raw --- src/image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/image.c b/src/image.c index 12fe8fea..603da253 100644 --- a/src/image.c +++ b/src/image.c @@ -475,6 +475,8 @@ static void image_read_ahead_done_cb(ImageLoader *il, gpointer data) { ImageWindow *imd = data; + if (!imd->read_ahead_fd || !imd->read_ahead_il) return; + DEBUG_1("%s read ahead done for :%s", get_exec_time(), imd->read_ahead_fd->path); if (!imd->read_ahead_fd->pixbuf) -- 2.20.1