summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-05-30 10:19:16 +0200
committerJan Holesovsky <kendy@collabora.com>2017-05-30 15:08:59 +0200
commit85460d3d92c153f76210b82b3e5ac78f005858c6 (patch)
tree726e6f7682afdf2708b26879eacc7cd46528a3b5 /sw
parentc3a09bc2025c8cb3c52d45f6a65152d1aebf0536 (diff)
tdf#107729: Disable toolbar items that are not available yet.
Otherwise trying to use them crashes LibreOffice. Change-Id: I268e5b783905ec7aaaf50cbc629fd44e6341bf8d Reviewed-on: https://gerrit.libreoffice.org/38186 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/apphdl.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 79e4fb4d8ceb..23b9b5bdec25 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -224,6 +224,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
// #i51949# hide e-Mail option if e-Mail is not supported
// #i63267# printing might be disabled
if (!xConfigItem ||
+ !xConfigItem->GetResultSet().is() ||
+ xConfigItem->GetCurrentDBData().sDataSource.isEmpty() ||
+ xConfigItem->GetCurrentDBData().sCommand.isEmpty() ||
(nWhich == FN_MAILMERGE_PRINT_DOCUMENTS && Application::GetSettings().GetMiscSettings().GetDisablePrinting()) ||
(nWhich == FN_MAILMERGE_EMAIL_DOCUMENTS && !xConfigItem->IsMailAvailable()))
{