diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-17 19:06:17 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-17 19:09:24 +0100 |
commit | b3652dae4b4d3f02fc0c02d9e139391ef43d7ba5 (patch) | |
tree | 6eb34589618fc125b1a664594511c44cf60c4551 /sc | |
parent | 68e10304389fee75bc069d25c5bfe4b50d0b58a4 (diff) |
coverity: fix memory leak
Change-Id: I2a620971d70c021c7a31dac14ce76f3428324f26
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 0d17fa6df187..e4183e74a332 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -889,8 +889,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const return NULL; } - ScIconSetInfo* pInfo = new ScIconSetInfo; - // now we have for sure a value double nVal = mpDoc->GetValue(rAddr); @@ -919,6 +917,8 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const if(nVal >= nValMax) ++nIndex; + ScIconSetInfo* pInfo = new ScIconSetInfo; + if(mpFormatData->mbReverse) { sal_Int32 nMaxIndex = mpFormatData->maEntries.size() - 1; |