summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-05-30 10:19:16 +0200
committerEike Rathke <erack@redhat.com>2017-05-30 18:24:14 +0200
commit824426811897347d8a9aacff4f304572cec1473c (patch)
tree4913d75dd7f3368404dae67ae1ed50a0462323c4
parent83bd801268203a28a47bafd17307c13fbc41e983 (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/38185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
-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 61a9e31b9f08..5abd1de7c9fa 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -248,6 +248,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()))
{