coverity#705870 Dereference before null check

Change-Id: Ie4588f8cb0f11b831d091b0f478b78d0472af160
This commit is contained in:
Caolán McNamara
2014-05-30 09:25:09 +01:00
parent 6a8e7fde50
commit faf8d79ef6

View File

@@ -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