Eeschema: fix crash when trying to edit a non symbol field using U,V or F
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21072
This commit is contained in:
@@ -1905,7 +1905,13 @@ int SCH_EDIT_TOOL::EditField( const TOOL_EVENT& aEvent )
|
||||
|| ( aEvent.IsAction( &SCH_ACTIONS::editFootprint ) && field->GetId() != FIELD_T::FOOTPRINT ) )
|
||||
{
|
||||
item = field->GetParentSymbol();
|
||||
|
||||
m_selectionTool->ClearSelection( true );
|
||||
|
||||
// If the field to edit is not a symbol field, we cannot edit the ref, value or footprint
|
||||
if( item == nullptr )
|
||||
return 0;
|
||||
|
||||
m_selectionTool->AddItemToSel( item );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user