sw/source/ui/dbui/mmresultdialogs.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 989705cd147fc1a937546da687f164d068fb794e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 18 15:24:56 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 30 16:50:43 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> (cherry picked from commit 94861ae06bf861218080d21fac8ed3835d8809dd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151928 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Tested-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())