Browse Source

drc_rule.cpp: avoid crash with a incorrect (broken or too old?) drc_rule file.

The crash was due to a null pointer not tested.
pull/16/head
jean-pierre charras 5 years ago
parent
commit
1aa38b8f82
  1. 8
      pcbnew/drc/drc_rule.cpp

8
pcbnew/drc/drc_rule.cpp

@ -78,6 +78,14 @@ const DRC_CONSTRAINT* GetConstraint( const BOARD_ITEM* aItem, const BOARD_ITEM*
}
else
{
if( !rule->m_Condition )
{
if( aReporter )
aReporter->Report( _( "No condition found; rule not applied." ) );
return nullptr;
}
if( aReporter )
{
aReporter->Report( wxString::Format( _( "Checking rule condition \"%s\"." ),

Loading…
Cancel
Save