From c6a6c071cf931aff87151d608b1e2aafbb910dd4 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 26 May 2020 21:17:16 -0400 Subject: [PATCH] PDF Plotter: avoid assert if default pen width is zero --- common/plotters/PDF_plotter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 5c68eee21e..afa9cca31d 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -93,7 +93,8 @@ void PDF_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData ) return; else if( aWidth == USE_DEFAULT_LINE_WIDTH ) aWidth = m_renderSettings->GetDefaultPenWidth(); - else if( aWidth == 0 ) + + if( aWidth == 0 ) aWidth = 1; wxASSERT_MSG( aWidth > 0, "Plotter called to set negative pen width" );