do not access token data after token has been destroyed

Change-Id: I624e64745fd3874be3e1bd3df6bac18dfb17aebb
This commit is contained in:
Eike Rathke
2015-06-13 15:12:32 +02:00
parent 0766db041e
commit c1fc84ac14

View File

@@ -2345,9 +2345,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;
}
}