Kaydet (Commit) 07544ac6 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#101383 don't crash is merge has no targetview on mail setup

Change-Id: I7d5d97443a64e2fe99d575e0e59914777f1723c4
üst 284c8ce1
......@@ -909,16 +909,17 @@ IMPL_LINK_TYPED(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton,
//get the composed document
SwView* pTargetView = xConfigItem->GetTargetView();
assert(pTargetView);
SAL_WARN_IF(!pTargetView, "sw.ui", "No TargetView in SwMailMergeConfigItem");
if (xConfigItem->GetMailServer().isEmpty() ||
!SwMailMergeHelper::CheckMailAddress(xConfigItem->GetMailAddress()) )
{
ScopedVclPtrInstance< QueryBox > aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
sal_uInt16 nRet = aQuery->Execute();
if(RET_YES == nRet )
if (RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
SwView* pConfigView = pTargetView ? pTargetView : pView;
SfxAllItemSet aSet(pConfigView->GetPool());
ScopedVclPtrInstance< SwMailConfigDlg > pDlg(pButton, aSet);
nRet = pDlg->Execute();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment