[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Fri Nov 1 15:28:43 CET 2013


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

New commits:
commit 3b27470860cfa377dfc0cb940bba204d827434ad
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

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 3d13382..8a3bc40 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2040,7 +2040,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)
         {
@@ -2056,19 +2056,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