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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user