diff --git a/pcbnew/class_pad_custom_shape_functions.cpp b/pcbnew/class_pad_custom_shape_functions.cpp index b1f0c1f6e8..7e8942a0d1 100644 --- a/pcbnew/class_pad_custom_shape_functions.cpp +++ b/pcbnew/class_pad_custom_shape_functions.cpp @@ -381,7 +381,7 @@ bool D_PAD::GetBestAnchorPosition( VECTOR2I& aPos ) minDistEdge = std::max( GetSize().x, GetSize().y ); } - OPT bestAnchor; + OPT bestAnchor( []()->OPT { return NULLOPT; }() ); for ( int y = 0; y < stepsY ; y++ ) {