mirror of https://github.com/apache/poi.git
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
01065fee5e
commit
43c981a497
|
@ -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