mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[ruamoko] Unlink passage nodes when deleting
Fixes a segfault on shutdown after the memory leak changes.
This commit is contained in:
parent
be9e6893e5
commit
161ccc282f
1 changed files with 5 additions and 2 deletions
|
@ -84,6 +84,10 @@ passage_new (gui_resources_t *res)
|
|||
static void
|
||||
passage_free (gui_resources_t *res, rua_passage_t *passage)
|
||||
{
|
||||
if (passage->next) {
|
||||
passage->next->prev = passage->prev;
|
||||
}
|
||||
*passage->prev = passage->next;
|
||||
PR_RESFREE (res->passage_map, passage);
|
||||
}
|
||||
|
||||
|
@ -192,8 +196,7 @@ bi_gui_clear (progs_t *pr, void *_res)
|
|||
{
|
||||
gui_resources_t *res = _res;
|
||||
|
||||
rua_passage_t *psg;
|
||||
for (psg = res->passages; psg; psg = psg->next) {
|
||||
for (rua_passage_t *psg = res->passages; psg; psg = psg->next) {
|
||||
Passage_Delete (psg->passage);
|
||||
}
|
||||
res->passages = 0;
|
||||
|
|
Loading…
Reference in a new issue