[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source

Caolán McNamara caolanm at redhat.com
Sat Nov 2 01:34:57 CET 2013


 sc/source/core/tool/interpr2.cxx |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 16aedfcc7a3aeb3ff30210d57f837583aa12b667
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 1 13:10:39 2013 +0000

    Resolves: fdo#71106 editing dde function crashes
    
    Change-Id: Id2f4bffb7de7201ddeb8f75daaa2723cc42c59b0
    (cherry picked from commit 3b27470860cfa377dfc0cb940bba204d827434ad)
    Reviewed-on: https://gerrit.libreoffice.org/6520
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index aec003e..7cc59de 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2124,7 +2124,7 @@ void ScInterpreter::ScDde()
         //! Dde-Links (zusaetzlich) effizienter am Dokument speichern !!!!!
         //      ScDdeLink* pLink = pDok->GetDdeLink( aAppl, aTopic, aItem );
 
-        bool bWasError = ( pMyFormulaCell->GetRawError() != 0 );
+        bool bWasError = ( pMyFormulaCell && pMyFormulaCell->GetRawError() != 0 );
 
         if (!pLink)
         {
@@ -2140,19 +2140,23 @@ void ScInterpreter::ScDde()
                                     //! asynchron auswerten ???
             pLink->TryUpdate();     //  TryUpdate ruft Update nicht mehrfach auf
 
-            // StartListening erst nach dem Update, sonst circular reference
-            pMyFormulaCell->StartListening( *pLink );
+            if (pMyFormulaCell)
+            {
+                // StartListening erst nach dem Update, sonst circular reference
+                pMyFormulaCell->StartListening( *pLink );
+            }
         }
         else
         {
-            pMyFormulaCell->StartListening( *pLink );
+            if (pMyFormulaCell)
+                pMyFormulaCell->StartListening( *pLink );
         }
 
         //  Wenn aus dem Reschedule beim Ausfuehren des Links ein Fehler
         //  (z.B. zirkulaere Referenz) entstanden ist, der vorher nicht da war,
         //  das Fehler-Flag zuruecksetzen:
 
-        if ( pMyFormulaCell->GetRawError() && !bWasError )
+        if ( pMyFormulaCell && pMyFormulaCell->GetRawError() && !bWasError )
             pMyFormulaCell->SetErrCode(0);
 
             //  Wert abfragen


More information about the Libreoffice-commits mailing list