coverity#704645 Dereference after null check

Change-Id: Id6930c8e87f27051520e10e1277d769d0b380374
This commit is contained in:
Caolán McNamara 2015-01-30 21:15:31 +00:00
parent 6ce0ca734f
commit 76e372ccd9

View File

@ -140,10 +140,9 @@ namespace frm
// create the peer
ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xContext, pParentWin, getModel() );
DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" );
if ( pPeer )
// by definition, the returned component is acquired once
pPeer->release();
assert(pPeer && "ONavigationBarControl::createPeer: invalid peer returned!");
// by definition, the returned component is acquired once
pPeer->release();
// announce the peer to the base class
setPeer( pPeer );