From 62f682beef0ee11c2be647bf268c6d18a9156275 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 16 Aug 2013 18:00:09 +0100 Subject: Bug 694522: Cope with selection of text on a JPEG image. If there is no text to select we return an array with a NULL in it and this causes the code to crash. Simple workaround. --- platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java') diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java b/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java index bc1fea71..e362d1e7 100644 --- a/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java +++ b/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java @@ -233,6 +233,8 @@ public class MuPDFCore ArrayList lns = new ArrayList(); for (TextChar[][][] bl: chars) { + if (bl == null) + continue; for (TextChar[][] ln: bl) { ArrayList wds = new ArrayList(); TextWord wd = new TextWord(); -- cgit v1.2.3