Ensure we are checking all ERC errors

Also, handle the possiblity that we return NULL when calling
DeserializeFromString in the case where we don't handle all cases or the
file is corrupted
This commit is contained in:
Seth Hillbrand 2024-05-28 06:54:23 -07:00
parent e3e63fb1b8
commit 43a622cadf
2 changed files with 7 additions and 0 deletions

View File

@ -221,6 +221,7 @@ std::vector<std::reference_wrapper<RC_ITEM>> ERC_ITEM::allItemTypes( {
ERC_ITEM::busEntryNeeded,
ERC_ITEM::endpointOffGrid,
ERC_ITEM::fourWayJunction,
ERC_ITEM::duplicatePinError,
ERC_ITEM::heading_conflicts,
ERC_ITEM::duplicateReference,

View File

@ -316,6 +316,12 @@ std::vector<SCH_MARKER*> SCHEMATIC::ResolveERCExclusions()
{
SCH_MARKER* testMarker = SCH_MARKER::DeserializeFromString( this, *it );
if( !testMarker )
{
it = settings.m_ErcExclusions.erase( it );
continue;
}
if( testMarker->IsLegacyMarker() )
{
const wxString settingsKey = testMarker->GetRCItem()->GetSettingsKey();