diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-06 11:54:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-06 16:35:45 +0000 |
commit | 553554d0c837b768bd24847320e0b4087a172aad (patch) | |
tree | 3d77670fe7499f699b25ea27e44e5fd9cbbf5ac8 /svtools/source | |
parent | 056a9a8b49fc081b092026a16ff4bf63d47052f6 (diff) |
coverity#982472 Dereference after null check
Change-Id: Ie797775184260fe5b5024d85be4244a56aee274a
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index d6312cbc0874..34609f8a3300 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -621,6 +621,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) pViewDataNewCur= pView->GetViewDataEntry(pEntry); if( pEntry && pEntry == pCursor && + pViewDataNewCur && pViewDataNewCur->HasFocus() && pViewDataNewCur->IsSelected()) { @@ -645,7 +646,8 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) pCursor = pEntry; if( pCursor ) { - pViewDataNewCur->SetFocus( true ); + if (pViewDataNewCur) + pViewDataNewCur->SetFocus( true ); if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode()) { pView->Select( pCursor, true ); |