summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-29 21:14:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-29 21:17:19 +0100
commitaa121a212320e46dc8f835766050c10998dcd197 (patch)
tree8f0a078b1ad530ffeea64e6f4a008ac85c068335 /sd
parent9e0e0db304d7734b486ccfc3aaeef0acad853e86 (diff)
coverity#1078827 Dereference before null check
Change-Id: I3d8850900e25606c23e2209abe828e2b1e98b38e
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 1d45a5b3d362..f6fd9fa9b101 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -969,18 +969,15 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
mpShowWindow = VclPtr<ShowWindow>::Create( this, mpParentWindow );
mpShowWindow->SetMouseAutoHide( !maPresSettings.mbMouseVisible );
- if( mpViewShell )
- {
- mpViewShell->SetActiveWindow( mpShowWindow );
- mpShowWindow->SetViewShell (mpViewShell);
- mpViewShell->GetViewShellBase().ShowUIControls (false);
- // Hide the side panes for in-place presentations.
- if ( ! maPresSettings.mbFullScreen)
- mpPaneHider.reset(new PaneHider(*mpViewShell,this));
+ mpViewShell->SetActiveWindow( mpShowWindow );
+ mpShowWindow->SetViewShell (mpViewShell);
+ mpViewShell->GetViewShellBase().ShowUIControls (false);
+ // Hide the side panes for in-place presentations.
+ if ( ! maPresSettings.mbFullScreen)
+ mpPaneHider.reset(new PaneHider(*mpViewShell,this));
- if( getViewFrame() )
- getViewFrame()->SetChildWindow( SID_NAVIGATOR, maPresSettings.mbStartWithNavigator );
- }
+ if( getViewFrame() )
+ getViewFrame()->SetChildWindow( SID_NAVIGATOR, maPresSettings.mbStartWithNavigator );
// these Slots are forbidden in other views for this document
if( mpDocSh )
@@ -1003,7 +1000,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// call resize handler
maPresSize = mpParentWindow->GetSizePixel();
- if( !maPresSettings.mbFullScreen && mpViewShell )
+ if (!maPresSettings.mbFullScreen)
{
const Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle();
maPresSize = aClientRect.GetSize();
@@ -1087,7 +1084,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
setActiveXToolbarsVisible( false );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL(
OString(OString("sd::SlideshowImpl::startShow(), "