sw/source/uibase/app/apphdl.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 824426811897347d8a9aacff4f304572cec1473c
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue May 30 10:19:16 2017 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Eike Rathke <er...@redhat.com>

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()))
                 {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to