A bit of safety to prevent dereferencing NULL.

This commit is contained in:
Jeff Young 2018-11-21 19:43:14 +00:00
parent 5a74b55074
commit f934ce653f
1 changed files with 1 additions and 1 deletions

View File

@ -1706,7 +1706,7 @@ bool LIB_EDIT_FRAME::isCurrentPart( const LIB_ID& aLibId ) const
// This will return the root part of any alias
LIB_PART* part = m_libMgr->GetBufferedPart( aLibId.GetLibItemName(), aLibId.GetLibNickname() );
// Now we can compare the libId of the current part and the root part
return ( GetCurPart() && part->GetLibId() == GetCurPart()->GetLibId() );
return ( part && GetCurPart() && part->GetLibId() == GetCurPart()->GetLibId() );
}