sw/source/ui/dbui/mmoutputtypepage.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 0cfaabfc9457d15c819811a10deaf00eaef0e260 Author: Michael Stahl <mst...@redhat.com> Date: Wed Jun 15 23:17:50 2016 +0200 tdf#98797 sw: try to fix crash in SwMailDispatcherListener_Impl Commit c48df7ad7d49ac093058ceb28d6d3f272f6e2e07 added a isDisposed() call in SwMailDispatcherListener_Impl::idle() and i can't see why that would not be necessary in the other functions that access m_pSendMailDialog if it is necessary in idle() - it's not obvious *why* it would be necessary in idle() in the first place but obviously i don't understand when SwSendMailDialog::dispose() is invoked (which is what deletes m_pStatus, dereferencing which the backtrace crashes). There is code in SwSendMailDialog::dispose() to handle the case that the xMailDispatcher thread is still running, and stop it without joining, which would obviously trigger this crash if it were ever executed. (Maybe i should actually try what happens at runtime, but these mail-merge dialogs are all scarily confusing.) Change-Id: I550f6107b064b0c97f3d33bed5bd3830fa2e86f4 (cherry picked from commit aa35f2981334ba2e5aed4269fe851054bbc584dc) Reviewed-on: https://gerrit.libreoffice.org/26353 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 5b7a4a7..0124992 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -182,7 +182,8 @@ void SwMailDispatcherListener_Impl::mailDelivered( uno::Reference< mail::XMailMessage> xMailMessage) { SolarMutexGuard aGuard; - m_pSendMailDialog->DocumentSent( xMailMessage, true, nullptr ); + if (!m_pSendMailDialog->isDisposed()) + m_pSendMailDialog->DocumentSent( xMailMessage, true, nullptr ); DeleteAttachments( xMailMessage ); } @@ -192,7 +193,8 @@ void SwMailDispatcherListener_Impl::mailDeliveryError( const OUString& sErrorMessage) { SolarMutexGuard aGuard; - m_pSendMailDialog->DocumentSent( xMailMessage, false, &sErrorMessage ); + if (!m_pSendMailDialog->isDisposed()) + m_pSendMailDialog->DocumentSent( xMailMessage, false, &sErrorMessage ); DeleteAttachments( xMailMessage ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits