From 254ba1f99849f08f52dbbd849d845f8a8800afa9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 11 Jan 2020 00:15:47 +0000 Subject: [PATCH] Fix null pointer access (from Coverity scan). --- pcbnew/plot_board_layers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index ef31f3ca05..e60d475646 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -141,8 +141,11 @@ void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, aggregateArea.BooleanAdd( candidate->GetFilledPolysList(), SHAPE_POLY_SET::PM_FAST ); } - aggregateArea.Fracture( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); - itemplotter.PlotFilledAreas( zone, aggregateArea ); + if( zone ) + { + aggregateArea.Fracture( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); + itemplotter.PlotFilledAreas( zone, aggregateArea ); + } aPlotter->EndBlock( NULL ); }