Potential NPE in PPExtractor; found while working on TIKA-1171

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1527041 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tim Allison 2013-09-27 19:35:14 +00:00
parent 1e8ffef6a6
commit 3e1208af44
1 changed files with 5 additions and 3 deletions

View 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");
}
}
}
}