Kaydet (Commit) 553554d0 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#982472 Dereference after null check

Change-Id: Ie797775184260fe5b5024d85be4244a56aee274a
üst 056a9a8b
...@@ -621,6 +621,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) ...@@ -621,6 +621,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
pViewDataNewCur= pView->GetViewDataEntry(pEntry); pViewDataNewCur= pView->GetViewDataEntry(pEntry);
if( pEntry && if( pEntry &&
pEntry == pCursor && pEntry == pCursor &&
pViewDataNewCur &&
pViewDataNewCur->HasFocus() && pViewDataNewCur->HasFocus() &&
pViewDataNewCur->IsSelected()) pViewDataNewCur->IsSelected())
{ {
...@@ -645,6 +646,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) ...@@ -645,6 +646,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
pCursor = pEntry; pCursor = pEntry;
if( pCursor ) if( pCursor )
{ {
if (pViewDataNewCur)
pViewDataNewCur->SetFocus( true ); pViewDataNewCur->SetFocus( true );
if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode()) if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment