Fix another static variable instance

Premature optimization appears to be the issue.  When we threaded zone
handling and added multiple layers, we started overwriting the
pointbuffer variable, which was declared static for unknown reasons

Fixes https://gitlab.com/kicad/code/kicad/issues/9888
This commit is contained in:
Seth Hillbrand 2022-05-06 11:48:34 -07:00
parent f4d4f23876
commit 5bd3a9cca8
1 changed files with 1 additions and 2 deletions

View File

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