From 4fcc4fecd19b793591dd17d77217881db2f75cf6 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 18 Feb 2015 13:24:10 +0000 Subject: Do not crash on text extraction on pages with no text. Thanks to malc for pointing out the problem. --- source/fitz/stext-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index cdba39f8..3213406e 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -265,6 +265,9 @@ strain_soup(fz_context *ctx, fz_text_device *tdev) fz_text_span *last_span = NULL; int span_num; + if (soup == NULL) + return; + /* Really dumb implementation to match what we had before */ for (span_num=0; span_num < soup->len; span_num++) { -- cgit v1.2.3