summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-05-30 10:19:16 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-31 15:32:00 +0200
commit6bbefb0acaa4a9cadab0a7018efa6c19d3f39712 (patch)
treefff990ebe4532a17af07b25f7cfebc8bc6c1cd4a /sw/source/uibase/app
parent945f21b8d1d89d6c5213fc2b6edc6a83adcf81b6 (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> (cherry picked from commit 824426811897347d8a9aacff4f304572cec1473c)
Diffstat (limited to 'sw/source/uibase/app')
-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()))
{