summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/token.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-13 15:12:32 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-18 11:19:47 +0200
commit147ec6b7fbdb8de5307e49b5d3f269d9159d2f21 (patch)
tree21ae5a50716d47c28781d12d4f65577dd779fb80 /sc/source/core/tool/token.cxx
parenta9b19fcc252da10b5ee3aed75fea5ee52d235124 (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/source/core/tool/token.cxx')
-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;
}
}