]> source.dussan.org Git - poi.git/commitdiff
Font names can sometimes be null.. We now accept this and can move on with
authorAndrew C. Oliver <acoliver@apache.org>
Fri, 2 May 2003 14:30:03 +0000 (14:30 +0000)
committerAndrew C. Oliver <acoliver@apache.org>
Fri, 2 May 2003 14:30:03 +0000 (14:30 +0000)
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

index f5ea0db2d0f42368352c640fe028e2902103af39..e010122cbfd530a270ebef7b585a8f3b9438e0cb 100644 (file)
@@ -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();
     }