Fix potential crash in pcbnew (if if a pad in a footprint in a mal-formed .pretty library contains a reference to a net)
This commit is contained in:
parent
21b98f40b7
commit
07ad6cb0bb
|
@ -2316,7 +2316,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
GetChars( CurSource() ), CurLineNumber(), CurOffset() )
|
||||
);
|
||||
NeedSYMBOLorNUMBER();
|
||||
if( FromUTF8() != m_board->FindNet( pad->GetNetCode() )->GetNetname() )
|
||||
if( m_board && FromUTF8() != m_board->FindNet( pad->GetNetCode() )->GetNetname() )
|
||||
THROW_IO_ERROR(
|
||||
wxString::Format( _( "invalid net ID in\nfile: <%s>\nline: %d\noffset: %d" ),
|
||||
GetChars( CurSource() ), CurLineNumber(), CurOffset() )
|
||||
|
|
Loading…
Reference in New Issue