[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Wed Jun 15 21:37:50 UTC 2016
sw/source/ui/dbui/mmoutputtypepage.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit aa35f2981334ba2e5aed4269fe851054bbc584dc
Author: Michael Stahl <mstahl at 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
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index b441456..e176958 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 );
}
More information about the Libreoffice-commits
mailing list