Check for NETINFO_ITEM before dereferencing it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17230
This commit is contained in:
parent
1ee49cca5e
commit
bd1d449cd3
|
@ -6464,7 +6464,8 @@ ZONE* PCB_IO_KICAD_SEXPR_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
|||
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||
|
||||
// Ensure the zone net name is valid, and matches the net code, for copper zones
|
||||
if( zone_has_net && ( zone->GetNet()->GetNetname() != netnameFromfile ) )
|
||||
if( zone_has_net
|
||||
&& ( !zone->GetNet() || zone->GetNet()->GetNetname() != netnameFromfile ) )
|
||||
{
|
||||
// Can happens which old boards, with nonexistent nets ...
|
||||
// or after being edited by hand
|
||||
|
|
Loading…
Reference in New Issue