summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-02-18 13:24:10 +0000
committerRobin Watts <robin.watts@artifex.com>2015-02-20 15:04:46 +0000
commit4fcc4fecd19b793591dd17d77217881db2f75cf6 (patch)
tree359513a55420658f9c7e58bb6fdbc09db27a0b34 /source
parent7dc088630b8b8871decad9d58985a9205790185e (diff)
downloadmupdf-4fcc4fecd19b793591dd17d77217881db2f75cf6.tar.xz
Do not crash on text extraction on pages with no text.
Thanks to malc for pointing out the problem.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/stext-device.c3
1 files changed, 3 insertions, 0 deletions
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++)
{