From b3652dae4b4d3f02fc0c02d9e139391ef43d7ba5 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 17 Feb 2013 19:06:17 +0100 Subject: coverity: fix memory leak Change-Id: I2a620971d70c021c7a31dac14ce76f3428324f26 --- sc/source/core/data/colorscale.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc') 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; -- cgit