Fixed the heap-use-after-free issue.

Just standard multithreading stuff; access to the allocator while hot
threads are running means stuff can change underneath us even /during/
a read.  I've mutex locked state for stuff in the drawing domain which
stops this issue.
This commit is contained in:
2025-12-12 04:29:32 +00:00
parent 5d78cb20df
commit a5666328b7
4 changed files with 12 additions and 4 deletions

View File

@@ -29,14 +29,14 @@ namespace cw::state
struct DrawState
{
const State &state;
State &state;
struct Bounds
{
cw::node::Node leftmost, rightmost;
f64 lower_val, upper_val;
} bounds;
DrawState(const State &state) : state{state} {};
DrawState(State &state) : state{state} {};
void compute_bounds(void);
};