Eeschema: fix a crash after reopening the ERC dialog, after changes in schematic.
When the ERC is run and a component has a ERC error linked to it, if it is deleted, when reopening the ERC dialog, the dialog crashed due to a not found item (null pointer use)
This commit is contained in:
parent
21c752fa0b
commit
59523efc1a
|
@ -270,7 +270,10 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
|
||||||
{
|
{
|
||||||
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetMainItemID() );
|
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetMainItemID() );
|
||||||
|
|
||||||
aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
|
if( item )
|
||||||
|
aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
|
||||||
|
else
|
||||||
|
aVariant = _( "item not found (Please, rerun ERC)" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -278,7 +281,10 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
|
||||||
{
|
{
|
||||||
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItemID() );
|
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItemID() );
|
||||||
|
|
||||||
aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
|
if( item )
|
||||||
|
aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
|
||||||
|
else
|
||||||
|
aVariant = _( "item not found (Please, rerun ERC)" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue