diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index 0c47b2a17a..6290b36c4d 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -974,7 +974,8 @@ void ZONE::HatchBorder() #define MAXPTS 200 // Usually we store only few values per one hatch line // depending on the complexity of the zone outline - std::vector pointbuffer; + static std::vector pointbuffer; + pointbuffer.clear(); pointbuffer.reserve( MAXPTS + 2 ); for( int a = min_a; a < max_a; a += spacing )