Author: maxcom
Date: Mon Nov 22 11:10:01 2010
New Revision: 1037670

URL: http://svn.apache.org/viewvc?rev=1037670&view=rev
Log:
hwpf: Ignore null argument in PicturesTable.hasPicture

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java?rev=1037670&r1=1037669&r2=1037670&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java 
Mon Nov 22 11:10:01 2010
@@ -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())) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to