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.
This commit is contained in:
parent
a98ea2fb2e
commit
1aa38b8f82
|
@ -78,6 +78,14 @@ const DRC_CONSTRAINT* GetConstraint( const BOARD_ITEM* aItem, const BOARD_ITEM*
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if( !rule->m_Condition )
|
||||||
|
{
|
||||||
|
if( aReporter )
|
||||||
|
aReporter->Report( _( "No condition found; rule not applied." ) );
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
aReporter->Report( wxString::Format( _( "Checking rule condition \"%s\"." ),
|
aReporter->Report( wxString::Format( _( "Checking rule condition \"%s\"." ),
|
||||||
|
|
Loading…
Reference in New Issue