[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
David Tardon
dtardon at redhat.com
Wed Oct 8 07:05:17 PDT 2014
sc/source/core/tool/token.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 53fd61faef7100e4609076a517e349e3b2ff2109
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 6 20:24:52 2014 +0200
avoid use of ref. to possibly deleted object
Change-Id: If5977b280fed8d8b053f59852d3984a59ce61a69
(cherry picked from commit ce5cc7afb0f1c99237d04e0c754527c725d8491c)
Reviewed-on: https://gerrit.libreoffice.org/11832
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 24f0343..77d7d1d 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2386,9 +2386,9 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
sal_uInt16 nFileId;
GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId);
//replace with ScExternalSingleRefToken and adjust references
- pCode[j]->DecRef();
ScExternalSingleRefToken* pToken = new ScExternalSingleRefToken(nFileId, aTabName, rRef);
pToken->IncRef();
+ pCode[j]->DecRef(); // ATTENTION: rRef can't be used after this point
pCode[j] = pToken;
}
}
More information about the Libreoffice-commits
mailing list