]> source.dussan.org Git - poi.git/commitdiff
fixed possible NPE in LbsDataSubRecord.toString()
authorYegor Kozlov <yegor@apache.org>
Sat, 19 Dec 2009 11:26:10 +0000 (11:26 +0000)
committerYegor Kozlov <yegor@apache.org>
Sat, 19 Dec 2009 11:26:10 +0000 (11:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@892461 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java

index 71217651df60e06d5b900a4cc486ba3e0cb6dc0b..57ebb203965e77c9c65682c02b5eda99c16a7068 100755 (executable)
@@ -243,7 +243,7 @@ public class LbsDataSubRecord extends SubRecord {
         sb.append("[ftLbsData]\n");\r
         sb.append("    .unknownShort1 =").append(HexDump.shortToHex(_cbFContinued)).append("\n");\r
         sb.append("    .formula        = ").append('\n');\r
-        sb.append(_linkPtg.toString()).append(_linkPtg.getRVAType()).append('\n');\r
+        if(_linkPtg != null) sb.append(_linkPtg.toString()).append(_linkPtg.getRVAType()).append('\n');\r
         sb.append("    .nEntryCount   =").append(HexDump.shortToHex(_cLines)).append("\n");\r
         sb.append("    .selEntryIx    =").append(HexDump.shortToHex(_iSel)).append("\n");\r
         sb.append("    .style         =").append(HexDump.shortToHex(_flags)).append("\n");\r