Browse Source

bug 60484: avoid NPE

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777063 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_16_BETA2
Javen O'Neal 7 years ago
parent
commit
16c68c9f05
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java

+ 5
- 2
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java View File

@@ -421,8 +421,11 @@ public final class Picture

if ( escherRecord instanceof EscherBSERecord )
{
return ( (EscherBSERecord) escherRecord ).getBlipRecord()
.getPicturedata();
EscherBlipRecord blip = ( (EscherBSERecord) escherRecord ).getBlipRecord();
if (blip != null) {
return blip.getPicturedata();
}
}
return new byte[0];
}

Loading…
Cancel
Save