Protect against dynamic_cast

Items might not be FOOTPRINT, in which case the dynamic_cast will return
nullptr.  Check for this in the subfunction
This commit is contained in:
Seth Hillbrand 2021-02-22 10:12:54 -08:00
parent 26995b10fb
commit bac7b3e77a
1 changed files with 3 additions and 0 deletions

View File

@ -169,6 +169,9 @@ static void insideCourtyard( LIBEVAL::CONTEXT* aCtx, void* self )
{
SHAPE_POLY_SET footprintCourtyard;
if( !footprint )
return false;
if( footprint->IsFlipped() )
footprintCourtyard = footprint->GetPolyCourtyardBack();
else