sc/source/core/tool/token.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa00d2ec45aa24a433b832c5287f3e8f41475326
Author: David Tardon <dtar...@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/11831
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 8263380..916a88e 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2396,9 +2396,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;
                 }
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to