From f68160a399d7b2ddad2faff740debfc5f95cfd9f Mon Sep 17 00:00:00 2001 From: Jason Height Date: Sun, 27 Aug 2006 11:17:22 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/hssf/record/PageBreakRecord.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.39.5