Skip to content

Commit 0281390

Browse files
committed
Fix race condition sometimes causing a crash
1 parent ba89f84 commit 0281390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/TreeSupportBaseCircle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class TreeSupportBaseCircle
1919
protected:
2020
inline static Polygon base_circle;
2121
inline static bool circle_generated = false;
22+
inline static std::mutex critical_sections;
2223

2324
public:
2425
inline static constexpr int64_t base_radius = 50;
@@ -31,7 +32,6 @@ class TreeSupportBaseCircle
3132
}
3233
else
3334
{
34-
std::mutex critical_sections;
3535
std::lock_guard<std::mutex> critical_section_progress(critical_sections);
3636
if (circle_generated)
3737
{

0 commit comments

Comments
 (0)