coverity#1224975 Dereference after null check

Change-Id: I89cc31ae5b7c598f16eb3f52d0e4cbce0acf4bc4
This commit is contained in:
Caolán McNamara
2014-10-24 11:40:47 +01:00
parent 5652f529b5
commit 6f32261fcf

View File

@@ -509,7 +509,7 @@ namespace rptui
pConditionCandidate = pConditionCandidate->GetParent(); pConditionCandidate = pConditionCandidate->GetParent();
pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL; pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL;
} }
if ( pPlaygroundCandidate == m_pConditionPlayground ) if (pConditionCandidate && pPlaygroundCandidate == m_pConditionPlayground)
{ {
impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() ); impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() );
} }