From 444672612ed6b0d4418eaa0e6798eec400885dda Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Fri, 2 May 2003 14:30:03 +0000 Subject: [PATCH] Font names can sometimes be null.. We now accept this and can move on with our serialization life. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353078 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/record/FontRecord.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/hssf/record/FontRecord.java b/src/java/org/apache/poi/hssf/record/FontRecord.java index f5ea0db2d..e010122cb 100644 --- a/src/java/org/apache/poi/hssf/record/FontRecord.java +++ b/src/java/org/apache/poi/hssf/record/FontRecord.java @@ -578,7 +578,9 @@ public class FontRecord data[ 17 + offset ] = (( byte ) 0); data[ 18 + offset ] = getFontNameLength(); data[ 19 + offset ] = ( byte ) 1; - StringUtil.putUncompressedUnicode(getFontName(), data, 20 + offset); + if (getFontName() != null) { + StringUtil.putUncompressedUnicode(getFontName(), data, 20 + offset); + } return getRecordSize(); }