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:
parent
b96718de91
commit
f956d04130
@ -482,7 +482,7 @@ public class Sheet implements Model
|
|||||||
public MergeCellsRecord.MergedRegion getMergedRegionAt(int index)
|
public MergeCellsRecord.MergedRegion getMergedRegionAt(int index)
|
||||||
{
|
{
|
||||||
//safety checks
|
//safety checks
|
||||||
if (index < numMergedRegions || mergedRecords.size() == 0)
|
if (index >= numMergedRegions || mergedRecords.size() == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user