]> source.dussan.org Git - poi.git/commitdiff
Bug 38796: Check for null in PageBreakRecord
authorJason Height <jheight@apache.org>
Sun, 27 Aug 2006 11:17:22 +0000 (11:17 +0000)
committerJason Height <jheight@apache.org>
Sun, 27 Aug 2006 11:17:22 +0000 (11:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437368 13f79535-47bb-0310-9956-ffa450edef68

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

index cd0746103054333f3dc4c3a8e8aab65e86025d95..2aff13cf420bc0ce9e2581982ba4ed429df14d88 100644 (file)
@@ -243,10 +243,12 @@ public class PageBreakRecord extends Record {
     /**
      * Retrieves the region at the row/column indicated
      * @param main FIXME: Document this!
-     * @return FIXME: Document this!
+     * @return The Break or null if no break exists at the row/col specified.
      */
     public Break getBreak(short main)
     {
+       if (BreakMap == null)
+               return null;
         Integer rowKey = new Integer(main);
         return (Break)BreakMap.get(rowKey);
     }