From 5a9fb08778795680fbe6dad327f6580374a5f4d6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 17 Feb 2022 09:21:14 +0100 Subject: [PATCH] zone_filler_tool: fix crash due to a null pointer use in zone filler. Fixes #10875 https://gitlab.com/kicad/code/kicad/issues/10875 --- pcbnew/tools/zone_filler_tool.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/zone_filler_tool.cpp b/pcbnew/tools/zone_filler_tool.cpp index 840feea83c..e37c70f3a5 100644 --- a/pcbnew/tools/zone_filler_tool.cpp +++ b/pcbnew/tools/zone_filler_tool.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014-2017 CERN - * Copyright (C) 2014-2018 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2022 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -157,7 +157,11 @@ void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRepo if( filler.Fill( toFill ) ) { - reporter->AdvancePhase(); + if( aReporter ) + aReporter->AdvancePhase(); + else + reporter->AdvancePhase(); + commit.Push( _( "Fill Zone(s)" ), true, true, false ); frame->m_ZoneFillsDirty = false; }