diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-18 15:24:56 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-21 13:28:40 +0200 |
commit | 5115fa097655a920231fc7eb957cfa9738007bdb (patch) | |
tree | 5aad5e7cdf993bcf89a5a98d4861469b159006c7 | |
parent | a3b562969addc84aa5216f8d0827027fa136fe70 (diff) |
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.grandin@collabora.co.uk>
(cherry picked from commit 9efbcce8b3f6f40a2687b9e4892527b6974227b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151920
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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()) |