diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-30 09:25:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-30 11:48:58 +0100 |
commit | faf8d79ef617090a710bd98f5ad936dd27a0867d (patch) | |
tree | 6c2d72fc5153f5ef25f0921befd111f612971420 /sd/source/ui/view | |
parent | 6a8e7fde5084b46d62c99aae91e4e6f78c14f178 (diff) |
coverity#705870 Dereference before null check
Change-Id: Ie4588f8cb0f11b831d091b0f478b78d0472af160
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index d56f754a140e..ba7d1a0e67da 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -816,13 +816,10 @@ void Outliner::DetectChange (void) } } - - - -bool Outliner::DetectSelectionChange (void) +bool Outliner::DetectSelectionChange() { bool bSelectionHasChanged = false; - sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount(); + sal_uLong nMarkCount = mpView ? mpView->GetMarkedObjectList().GetMarkCount() : 0; // If mpObj is NULL then we have not yet found our first match. // Detecting a change makes no sense. @@ -853,10 +850,7 @@ bool Outliner::DetectSelectionChange (void) return bSelectionHasChanged; } - - - -void Outliner::RememberStartPosition (void) +void Outliner::RememberStartPosition() { ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) @@ -909,10 +903,7 @@ void Outliner::RememberStartPosition (void) } } - - - -void Outliner::RestoreStartPosition (void) +void Outliner::RestoreStartPosition() { bool bRestore = true; // Take a negative start page index as inidicator that restoring the |