Re-add null component checking in UpdateNetHighlighting

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4606
This commit is contained in:
Jon Evans 2020-06-03 20:36:30 -04:00
parent a074b32615
commit ae852e17f9
1 changed files with 1 additions and 1 deletions

View File

@ -926,7 +926,7 @@ int SCH_EDITOR_CONTROL::UpdateNetHighlighting( const TOOL_EVENT& aEvent )
if( item->Type() == SCH_COMPONENT_T )
comp = static_cast<SCH_COMPONENT*>( item );
if( comp->GetPartRef() && comp->GetPartRef()->IsPower() )
if( comp && comp->GetPartRef() && comp->GetPartRef()->IsPower() )
itemConn = comp->Connection( m_frame->GetCurrentSheet() );
else
itemConn = item->Connection( m_frame->GetCurrentSheet() );