fix memory leak in pivot table code

Change-Id: I191e2748980b627b38e604ad456612535bda0302
This commit is contained in:
Markus Mohrhard
2016-03-12 15:11:11 +01:00
parent 259fc9f32e
commit a9c3b23c3b

View File

@@ -890,7 +890,8 @@ ResultMembers* ScDPResultData::GetDimResultMembers(long nDim, ScDPDimension* pDi
if (nDim < static_cast<long>(maDimMembers.size()) && maDimMembers[nDim])
return maDimMembers[nDim];
maDimMembers.resize(nDim+1, nullptr);
if (nDim >= static_cast<long>(maDimMembers.size()))
maDimMembers.resize(nDim+1, nullptr);
ResultMembers* pResultMembers = new ResultMembers();
// global order is used to initialize aMembers, so it doesn't have to be looked at later