sd/source/ui/func/fuolbull.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
New commits: commit fb842a3daf5c6b9dcbf88a57bf7bf24d87ffbcca Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jan 16 08:56:44 2019 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Tue Jan 14 19:15:49 2020 +0100 fix crash in draw Format->Bullets and Numbering dialog regression from commit a2b78c131db2bbe3555a89dfae32aefcd00949f5 make Format->Bullets and Numbering dialog async Change-Id: Ia726612a492e644f5e40e78a3b537c5ed539aef8 Reviewed-on: https://gerrit.libreoffice.org/66423 Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> Tested-by: Jenkins (cherry picked from commit 84acbfd2ef8a895d8689fccfffce03df02240b4e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86784 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 14dc697e71be..e695eaad8c70 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -95,20 +95,23 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) std::shared_ptr<SfxRequest> xRequest(new SfxRequest(rReq)); rReq.Ignore(); // the 'old' request is not relevant any more - pDlg->StartExecuteAsync([this, pDlg, xRequest](sal_Int32 nResult){ + // do not capture this, because this will go way before the dialog finishes executing + auto pView = mpView; + auto pViewShell = mpViewShell; + pDlg->StartExecuteAsync([pView, pViewShell, pDlg, xRequest](sal_Int32 nResult){ if( nResult == RET_OK ) { SfxItemSet aSet( *pDlg->GetOutputItemSet() ); - OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); + OutlinerView* pOLV = pView->GetTextEditOutlinerView(); std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard; - if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView)) + if (OutlineView* pOutlineView = dynamic_cast<OutlineView*>(pView)) { - pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow()); - aGuard.reset(new OutlineViewModelChangeGuard(*pView)); + pOLV = pOutlineView->GetViewByWindow(pViewShell->GetActiveWindow()); + aGuard.reset(new OutlineViewModelChangeGuard(*pOutlineView)); } if( pOLV ) @@ -118,7 +121,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) /* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch changes to master page and redirect to a template */ - mpView->SetAttributes(*xRequest->GetArgs()); + pView->SetAttributes(*xRequest->GetArgs()); } pDlg->disposeOnce(); }); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits