kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0001-Resolves-rhbz-1471983-fatal-exception-on-older-confi.patch

91334d
From f1ccc7aaf11dfcff554306e27350459951d746e0 Mon Sep 17 00:00:00 2001
91334d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
91334d
Date: Mon, 9 Oct 2017 14:28:24 +0100
91334d
Subject: [PATCH] Resolves: rhbz#1471983 fatal exception on older config
91334d
 without slide bg panel
91334d
91334d
Change-Id: Id437bdd8feac06da42c180ff4f7759ec282fa8d4
91334d
---
91334d
 sd/source/ui/sidebar/SlideBackground.cxx | 11 +++++++----
91334d
 1 file changed, 7 insertions(+), 4 deletions(-)
91334d
91334d
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
91334d
index f98e5be..3e3df8b 100644
91334d
--- a/sd/source/ui/sidebar/SlideBackground.cxx
91334d
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
91334d
@@ -422,11 +422,14 @@ void SlideBackground::SetPanelTitle( const OUString& rTitle )
91334d
     if ( !xPanels.is() )
91334d
         return;
91334d
 
91334d
-    Reference<ui::XPanel> xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY);
91334d
-    if ( !xPanel.is() )
91334d
-        return;
91334d
+    if (xPanels->hasByName("SlideBackgroundPanel"))
91334d
+    {
91334d
+        Reference<ui::XPanel> xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY);
91334d
+        if ( !xPanel.is() )
91334d
+            return;
91334d
 
91334d
-    xPanel->setTitle( rTitle );
91334d
+        xPanel->setTitle( rTitle );
91334d
+    }
91334d
 }
91334d
 
91334d
 void SlideBackground::addListener()
91334d
-- 
91334d
2.9.5
91334d