Skip to content

Commit

Permalink
Fix potential memory leaks in a multithreaded environment
Browse files Browse the repository at this point in the history
  • Loading branch information
sammycage committed Sep 12, 2024
1 parent 199d72e commit 5bccf76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Transform Transform::translated(float tx, float ty)

static plutovg_path_t* defaultPathData()
{
thread_local plutovg_path_t* path = nullptr;
static plutovg_path_t* path = nullptr;
if(path == nullptr)
path = plutovg_path_create();
return plutovg_path_reference(path);
Expand Down

0 comments on commit 5bccf76

Please sign in to comment.