summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-09 14:28:24 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-10-17 11:34:21 +0200
commit70205e37455b2d3a7155f65e0c1bfd2a89239046 (patch)
tree74663f06eeafc7562537bddfe1f459443bd9eb07 /sd
parent35fcdb14e5d8af2f9770fc1994ad47b0774b9a55 (diff)
Resolves: rhbz#1471983 fatal exception on older config without slide bg panel
Change-Id: Id437bdd8feac06da42c180ff4f7759ec282fa8d4 Reviewed-on: https://gerrit.libreoffice.org/43280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 7425518a5980..23f266cf95dd 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -294,11 +294,14 @@ void SlideBackground::SetPanelTitle( const OUString& rTitle )
if ( !xPanels.is() )
return;
- Reference<ui::XPanel> xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY);
- if ( !xPanel.is() )
- return;
+ if (xPanels->hasByName("SlideBackgroundPanel"))
+ {
+ Reference<ui::XPanel> xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY);
+ if ( !xPanel.is() )
+ return;
- xPanel->setTitle( rTitle );
+ xPanel->setTitle( rTitle );
+ }
}
void SlideBackground::addListener()