447b26a
From 5620f5ba2fa123f029ac449f69a89ffc5703c71e Mon Sep 17 00:00:00 2001
447b26a
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
447b26a
Date: Thu, 21 Nov 2013 15:27:59 +0000
447b26a
Subject: [PATCH] Related: rhbz#1032774 bodge-around reported NULL value here
447b26a
447b26a
Change-Id: I9c4791b8f82cdd6e4823f88f592ad9ce233b6966
447b26a
---
447b26a
 sd/source/ui/slideshow/slideshow.cxx | 11 ++++++++---
447b26a
 1 file changed, 8 insertions(+), 3 deletions(-)
447b26a
447b26a
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
447b26a
index 2bab38d..b71cad6 100644
447b26a
--- a/sd/source/ui/slideshow/slideshow.cxx
447b26a
+++ b/sd/source/ui/slideshow/slideshow.cxx
447b26a
@@ -1235,10 +1235,15 @@ void SlideShow::StartFullscreenPresentation( )
447b26a
         // frame view of the current view shell.  This avoids that
447b26a
         // changes made by the presentation have an effect on the other
447b26a
         // view shells.
447b26a
-        FrameView* pOriginalFrameView = mpCurrentViewShellBase ? mpCurrentViewShellBase->GetMainViewShell()->GetFrameView() : 0;
447b26a
+        FrameView* pOriginalFrameView = 0;
447b26a
+        if (mpCurrentViewShellBase)
447b26a
+        {
447b26a
+            ::boost::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell());
447b26a
+            if (xShell.get())
447b26a
+                pOriginalFrameView = xShell->GetFrameView();
447b26a
+        }
447b26a
 
447b26a
-        if( mpFullScreenFrameView )
447b26a
-            delete mpFullScreenFrameView;
447b26a
+        delete mpFullScreenFrameView;
447b26a
         mpFullScreenFrameView = new FrameView(mpDoc, pOriginalFrameView);
447b26a
 
447b26a
         // The new frame is created hidden.  To make it visible and activate the
447b26a
-- 
447b26a
1.8.3.1
447b26a