Fix crash opening footprint editor in debug mode with no board

This commit is contained in:
Jon Evans 2020-02-25 20:19:54 -05:00
parent 009641d151
commit 5e9e46c7bd
1 changed files with 3 additions and 2 deletions

View File

@ -1533,8 +1533,9 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
// read Netname
ReadDelimitedText( buf, data, sizeof(buf) );
wxASSERT( m_board->FindNet( getNetCode( netcode ) )->GetNetname()
== FROM_UTF8( StrPurge( buf ) ) );
if( m_board )
wxASSERT( m_board->FindNet( getNetCode( netcode ) )->GetNetname()
== FROM_UTF8( StrPurge( buf ) ) );
}
else if( TESTLINE( "Po" ) ) // (Po)sition