changeset 2252:f2b8d63842ca

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
author Michael Schwendt <mschwendt@gmail.com>
date Tue, 11 Aug 2015 23:21:37 +0100
parents f1dc378261e4
children a9b5d451b83a
files src/image.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Tue Aug 11 23:19:25 2015 +0100
+++ b/src/image.c	Tue Aug 11 23:21:37 2015 +0100
@@ -475,6 +475,8 @@
 {
 	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)