mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-22 02:47:38 +00:00
shader: Fix use-after-free bug in object_pool
This commit is contained in:
parent
3d07cef009
commit
1d2db78398
|
@ -32,12 +32,12 @@ public:
|
|||
const size_t total_objects{root.num_objects + new_chunk_size * (chunks.size() - 1)};
|
||||
chunks.clear();
|
||||
chunks.emplace_back(total_objects);
|
||||
chunks.shrink_to_fit();
|
||||
} else {
|
||||
root.Release();
|
||||
chunks.resize(1);
|
||||
chunks.shrink_to_fit();
|
||||
}
|
||||
chunks.shrink_to_fit();
|
||||
node = &chunks.front();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue