Fix gerbview assertion when drawing flashed shape without D_CODE

Remove wxASSERT_MSG for null D_CODE in drawFlashedShape. The null
guard and early return already handles this case correctly. Malformed
gerber files can have items without a valid aperture code.

Fixes KICAD-1089
This commit is contained in:
Seth Hillbrand
2026-02-16 10:10:50 -08:00
parent a44ac7d29b
commit 2df6f06c2f
+3 -2
View File
@@ -483,10 +483,11 @@ void GERBVIEW_PAINTER::drawFlashedShape( GERBER_DRAW_ITEM* aItem, bool aFilled )
{
D_CODE* code = aItem->GetDcodeDescr();
wxASSERT_MSG( code, wxT( "drawFlashedShape: Item has no D_CODE!" ) );
if( !code )
{
wxLogDebug( wxT( "drawFlashedShape: Item has no D_CODE" ) );
return;
}
m_gal->SetIsFill( aFilled );
m_gal->SetIsStroke( !aFilled );