From: Maxim Valyanskiy Date: Mon, 22 Nov 2010 11:10:01 +0000 (+0000) Subject: hwpf: Ignore null argument in PicturesTable.hasPicture X-Git-Tag: REL_3_8_BETA1~119 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=28e0a3f566a25b2cab47a477c1bd01d0578d2277;p=poi.git hwpf: Ignore null argument in PicturesTable.hasPicture git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1037670 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java index d6117ad65e..f904b6141b 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java @@ -87,6 +87,10 @@ public final class PicturesTable * @param run */ public boolean hasPicture(CharacterRun run) { + if (run==null) { + return false; + } + if (run.isSpecialCharacter() && !run.isObj() && !run.isOle2() && !run.isData()) { // Image should be in it's own run, or in a run with the end-of-special marker if("\u0001".equals(run.text()) || "\u0001\u0015".equals(run.text())) {