From 982c21720ee7e1206f8bc610f3d44cf3f54e81c6 Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Thu, 28 Nov 2002 19:03:22 +0000 Subject: [PATCH] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13483 Patch from Jens Gerhard PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352928 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/model/Sheet.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/poi/hssf/model/Sheet.java b/src/java/org/apache/poi/hssf/model/Sheet.java index 1d8995aebd..8661686682 100644 --- a/src/java/org/apache/poi/hssf/model/Sheet.java +++ b/src/java/org/apache/poi/hssf/model/Sheet.java @@ -431,9 +431,10 @@ public class Sheet implements Model } public int getNumMergedRegions() - { - return merged.getNumAreas(); - } + { + return merged!=null ? merged.getNumAreas() : 0; + } + /** * This is basically a kludge to deal with the now obsolete Label records. If