Fixed a crash when trying to highlight a not existing component
This commit is contained in:
parent
f6e6ac3162
commit
bce4a45ab4
|
@ -235,9 +235,12 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
|||
|
||||
SetStatusText( msg );
|
||||
|
||||
// highlight selection
|
||||
GetCanvas()->GetView()->HighlightItem( foundItem, pin );
|
||||
GetCanvas()->Refresh();
|
||||
if( foundItem )
|
||||
{
|
||||
// highlight selection
|
||||
GetCanvas()->GetView()->HighlightItem( foundItem, pin );
|
||||
GetCanvas()->Refresh();
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue