diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-01 13:10:39 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-03 09:50:28 +0100 |
commit | 7ae1a289344991472ced55d3ba40373ab94823f5 (patch) | |
tree | 4b24bc861d56e1ce8e55bec2ab1174705ddf5988 /sc | |
parent | e0279f0148b215b6c1020b6fa2cce23313e6063d (diff) |
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@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index aec003ef1866..7cc59de7800b 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 |