diff options
-rw-r--r-- | sc/source/core/data/cell.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 05c227946046..324639129c41 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -187,9 +187,10 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl if (!bInserted) { //if this happened we have a real problem - delete pRangeData; - pToken->SetIndex(-1); + pRangeData = NULL; + pToken->SetIndex(0); OSL_FAIL("inserting the range name should not fail"); + return; } } sal_Int32 nIndex = pRangeData->GetIndex(); |