]> source.dussan.org Git - poi.git/commitdiff
Potential NPE in PPExtractor; found while working on TIKA-1171
authorTim Allison <tallison@apache.org>
Fri, 27 Sep 2013 19:35:14 +0000 (19:35 +0000)
committerTim Allison <tallison@apache.org>
Fri, 27 Sep 2013 19:35:14 +0000 (19:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1527041 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java

index f416d639079c67bf13ffa1c39244ec57da66156d..d96e2243d143281ae0091bff1bdee4e5d5247ef1 100644 (file)
@@ -231,9 +231,11 @@ public final class PowerPointExtractor extends POIOLE2TextExtractor {
                             }
                             TextShape tsh = (TextShape)sh;
                             String text = tsh.getText();
-                            ret.append(text);
-                            if (!text.endsWith("\n")) {
-                                ret.append("\n");
+                            if (text != null){
+                                ret.append(text);
+                                if (!text.endsWith("\n")) {
+                                    ret.append("\n");
+                                }
                             }
                         }
                     }