diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-10 20:19:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-10 21:07:55 +0100 |
commit | af110680a5dafffbb4ab13c23cb4c977afad16ca (patch) | |
tree | 499cde5593b99782d4fa42c715186f6d3ac311d0 /sc | |
parent | c27fc13c9947170480b62058849f72ea779bc5b0 (diff) |
coverity#705472 Dereference null return value
Change-Id: I1786b212207d1993246f24ad5f5237453554984a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/olinewin.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 525df555779a..d65234babe83 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -297,9 +297,10 @@ bool ScOutlineWindow::GetEntryPos( rnImagePos = rnStartPos; // do not cover previous collapsed image - if ( !bHidden && nEntry ) + bool bDoNoCover = !bHidden && nEntry; + const ScOutlineEntry* pPrevEntry = bDoNoCover ? GetOutlineEntry(nLevel, nEntry - 1) : NULL; + if (pPrevEntry) { - const ScOutlineEntry* pPrevEntry = GetOutlineEntry( nLevel, nEntry - 1 ); SCCOLROW nPrevEnd = pPrevEntry->GetEnd(); if ( (nPrevEnd + 1 == nStart) && IsHidden( nPrevEnd ) ) { |