diff --git a/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp b/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp index 2aa1461be4..6aa0c2b807 100644 --- a/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp +++ b/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp @@ -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