You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2017/05/16 19:00:32 UTC
[tika] branch master updated: TIKA-2367 -- avoid npe in WMF
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/master by this push:
new 48580b0 TIKA-2367 -- avoid npe in WMF
48580b0 is described below
commit 48580b0dd9bae39d8a32192bc2b8c3e4177a84be
Author: tballison <ta...@mitre.org>
AuthorDate: Tue May 16 15:00:19 2017 -0400
TIKA-2367 -- avoid npe in WMF
---
.../src/main/java/org/apache/tika/parser/microsoft/WMFParser.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
index 33fbbd4..aef09f9 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
+++ b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
@@ -71,7 +71,9 @@ public class WMFParser extends AbstractParser {
//This fix should be done within POI
if (record.getRecordType().equals(HwmfRecordType.createFontIndirect)) {
HwmfFont font = ((HwmfText.WmfCreateFontIndirect) record).getFont();
- charset = (font.getCharSet().getCharset() == null) ? LocaleUtil.CHARSET_1252 : font.getCharSet().getCharset();
+ charset = (font.getCharSet() == null || font.getCharSet().getCharset() == null)
+ ? LocaleUtil.CHARSET_1252 :
+ font.getCharSet().getCharset();
}
if (record.getRecordType().equals(HwmfRecordType.extTextOut)) {
HwmfText.WmfExtTextOut textOut = (HwmfText.WmfExtTextOut) record;
--
To stop receiving notification emails like this one, please contact
['"commits@tika.apache.org" <co...@tika.apache.org>'].