summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/documen3.cxx')
-rw-r--r--sc/source/core/data/documen3.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index e8fed65d4c30..5cafb2a17fa1 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -200,11 +200,13 @@ void ScDocument::SetRangeName(SCTAB nTab, ScRangeName* pNew)
void ScDocument::SetRangeName( ScRangeName* pNewRangeName )
{
+ if (pRangeName == pNewRangeName)
+ return;
+
delete pRangeName;
pRangeName = pNewRangeName;
}
-
const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, OUString* pName ) const
{
const ScRangeData* pData = NULL;