diff --git a/pcbnew/pcb_expr_evaluator.cpp b/pcbnew/pcb_expr_evaluator.cpp index fd053a93d1..8cb8e17563 100644 --- a/pcbnew/pcb_expr_evaluator.cpp +++ b/pcbnew/pcb_expr_evaluator.cpp @@ -183,7 +183,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self ) } } - if( zone ) + if( zone && zone->GetLayerSet().test( context->GetLayer() ) ) { SHAPE_POLY_SET zonePoly = zone->GetFilledPolysList( context->GetLayer() ); SHAPE_POLY_SET testPoly;