sw/source/ui/dbui/mmresultdialogs.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 9f31ebf85efa13bd6363efefdb7c1e8272fa823d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 18 15:24:56 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri May 19 13:24:42 2023 +0200 prevent crash in mail merge seen reports in crashreporter Change-Id: I10ecac363eea0292f9dc257769da6d060dc350f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 9efbcce8b3f6f40a2687b9e4892527b6974227b7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151920 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 8d733118bbb4..b3404a30231a 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -893,6 +893,12 @@ IMPL_LINK(SwMMResultEmailDialog, SendTypeHdl_Impl, weld::ComboBox&, rBox, void) IMPL_LINK_NOARG(SwMMResultEmailDialog, SendAsHdl_Impl, weld::Button&, void) { + // work around crash when calling constructor with no active view + if (!GetActiveView()) + { + SAL_WARN("sw", "ignoring SendAs button click, because no active view"); + return; + } SwMailBodyDialog aDlg(m_xDialog.get()); aDlg.SetBody(m_sBody); if (RET_OK == aDlg.run())