Fixes NullPointerException for getMergedRegionAt(index) when the index provided is valid (ie, 2 merged regions, request for index 0 would return null).

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Danny Muid 2003-03-06 21:40:35 +00:00
parent b96718de91
commit f956d04130
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ public class Sheet implements Model
public MergeCellsRecord.MergedRegion getMergedRegionAt(int index)
{
//safety checks
if (index < numMergedRegions || mergedRecords.size() == 0)
if (index >= numMergedRegions || mergedRecords.size() == 0)
return null;
int pos = 0;