summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-13 15:12:32 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-06-16 14:39:28 +0000
commit012a2f0876663af77316c657c0dbdafd82acb79e (patch)
tree7aff7974a064963ce96b8032bbabc84b70c95c87 /sc
parent0c02e1892ad87aa81e29b5642b16db3f4c128418 (diff)
do not access token data after token has been destroyed
Change-Id: I624e64745fd3874be3e1bd3df6bac18dfb17aebb (cherry picked from commit c1fc84ac140d519e0bfa7a607e36771682b08eed) Reviewed-on: https://gerrit.libreoffice.org/16258 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/token.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index a96936c9d961..1e5c7d2ec35a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2245,9 +2245,9 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
OUString aTabName;
sal_uInt16 nFileId;
GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId);
- pCode[j]->DecRef();
ScExternalDoubleRefToken* pToken = new ScExternalDoubleRefToken(nFileId, aTabName, rRef);
pToken->IncRef();
+ pCode[j]->DecRef(); // ATTENTION: rRef can't be used after this point
pCode[j] = pToken;
}
}