diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-01 13:10:39 +0000 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2013-11-01 19:34:37 -0500 |
commit | 16aedfcc7a3aeb3ff30210d57f837583aa12b667 (patch) | |
tree | 5e40529e0e14439f277323ba8efda24670b5855a /sc | |
parent | b350dc2e1e4c3ac7cb722569d462c95dbb3cbbda (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 |