Don't assume a DRC_CONSTRAINT has a parent rule.

It will still have a name, though.
This commit is contained in:
Jeff Young 2020-10-09 14:26:09 +01:00
parent 1cb0cbff2e
commit 2ca819a627
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ bool PNS_PCBNEW_RULE_RESOLVER::QueryConstraint( PNS::CONSTRAINT_TYPE aType, cons
case PNS::CONSTRAINT_TYPE::CT_WIDTH:
case PNS::CONSTRAINT_TYPE::CT_DIFF_PAIR_GAP:
aConstraint->m_Value = hostConstraint.GetValue();
aConstraint->m_RuleName = hostConstraint.GetParentRule()->m_Name;
aConstraint->m_RuleName = hostConstraint.GetName();
aConstraint->m_Type = aType;
return true;
}