From 6a7266d589782aa83a5368ccb6e4ea403a6f979f Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Tue, 15 Sep 2020 21:17:32 +0100 Subject: [PATCH] Only update DRC progress reporter if the reporter exists The DRC engine might not have a reporter when run headless --- pcbnew/drc/drc_engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index f0ca91b7ab..7f40396446 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -410,7 +410,8 @@ void DRC_ENGINE::RunTests( EDA_UNITS aUnits, bool aTestTracksAgainstZones, for( DRC_TEST_PROVIDER* provider : m_testProviders ) phases += provider->GetNumPhases(); - m_progressReporter->AddPhases( phases ); + if( m_progressReporter ) + m_progressReporter->AddPhases( phases ); for( int ii = DRCE_FIRST; ii < DRCE_LAST; ++ii ) {