python scripting: better fix for commit 5a79821
(fix crash due to a null pointer):
Try to use a better error message for severity. Fixes #13160 https://gitlab.com/kicad/code/kicad/issues/13160
This commit is contained in:
parent
e3b8475a3d
commit
6c73fe05e9
|
@ -534,7 +534,7 @@ bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
|
|||
for( const std::shared_ptr<DRC_ITEM>& item : violations )
|
||||
{
|
||||
SEVERITY severity = item->GetParent() ? item->GetParent()->GetSeverity()
|
||||
: RPT_SEVERITY_UNDEFINED;
|
||||
: bds.GetSeverity( item->GetErrorCode() );
|
||||
fprintf( fp, "%s", TO_UTF8( item->ShowReport( &unitsProvider, severity, itemMap ) ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue