Check for NETINFO_ITEM before dereferencing it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17230
(cherry picked from commit bd1d449cd3
)
This commit is contained in:
parent
3d67ab72c6
commit
a0905ac87d
|
@ -6184,7 +6184,8 @@ ZONE* PCB_IO_KICAD_SEXPR_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
||||||
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||||
|
|
||||||
// Ensure the zone net name is valid, and matches the net code, for copper zones
|
// 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 ...
|
// Can happens which old boards, with nonexistent nets ...
|
||||||
// or after being edited by hand
|
// or after being edited by hand
|
||||||
|
|
Loading…
Reference in New Issue