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:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user