mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 09:11:55 -05:00
Fix rare use after free
This commit is contained in:
parent
c518da4be0
commit
1d6b0f12b2
1 changed files with 3 additions and 2 deletions
|
@ -483,8 +483,9 @@ void world_render_completed(struct world* w, bool new_render) {
|
|||
ilist_chunks2_it(it, w->gpu_busy_chunks);
|
||||
|
||||
while(!ilist_chunks2_end_p(it)) {
|
||||
chunk_unref(ilist_chunks2_ref(it));
|
||||
ilist_chunks2_next(it);
|
||||
struct chunk* c = ilist_chunks2_ref(it);
|
||||
ilist_chunks2_remove(w->gpu_busy_chunks, it);
|
||||
chunk_unref(c);
|
||||
}
|
||||
|
||||
ilist_chunks2_reset(w->gpu_busy_chunks);
|
||||
|
|
Loading…
Reference in a new issue