summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++)
{