From b888dff2f010ae20216c40f39cf6dee66d1fea14 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 4 Apr 2020 19:27:41 +0100 Subject: rhbz#1820868 deref of null xLayoutManager Change-Id: Ib396ef9f5b019b08a181eeb5a8eb983bdb401db4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91711 Tested-by: Jenkins Reviewed-by: Michael Stahl --- svx/source/dialog/srchdlg.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 1f95fbe21a7c..445bc318718b 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2440,6 +2440,8 @@ OUString SvxSearchDialogWrapper::GetSearchLabel() pViewFrame->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + if (!xLayoutManager.is()) + return OUString(); css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/findbar"); if (!xUIElement.is()) -- cgit v1.2.3