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(); }