diff --git a/openpdf/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java b/openpdf/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java index 6547706a5..34395df47 100755 --- a/openpdf/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java +++ b/openpdf/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java @@ -1630,6 +1630,8 @@ void CreateNonCIDSubrs(int Font,IndexBaseItem PrivateBase,OffsetItem Subrs) // Mark the beginning of the Subrs index OutputList.addLast(new SubrMarkerItem(Subrs,PrivateBase)); // Put the subsetted new subrs index - OutputList.addLast(new RangeItem(new RandomAccessFileOrArray(NewSubrsIndexNonCID),0,NewSubrsIndexNonCID.length)); + if (NewSubrsIndexNonCID != null) { + OutputList.addLast(new RangeItem(new RandomAccessFileOrArray(NewSubrsIndexNonCID), 0, NewSubrsIndexNonCID.length)); + } } }