From: Jason Height Date: Sun, 27 Aug 2006 11:17:22 +0000 (+0000) Subject: Bug 38796: Check for null in PageBreakRecord X-Git-Tag: REL_3_0_ALPHA3~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f68160a399d7b2ddad2faff740debfc5f95cfd9f;p=poi.git Bug 38796: Check for null in PageBreakRecord git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437368 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/record/PageBreakRecord.java b/src/java/org/apache/poi/hssf/record/PageBreakRecord.java index cd07461030..2aff13cf42 100644 --- a/src/java/org/apache/poi/hssf/record/PageBreakRecord.java +++ b/src/java/org/apache/poi/hssf/record/PageBreakRecord.java @@ -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); }