Small bug fix in zr_free_window
win->next can be zero and win->prev probably as well.
This commit is contained in:
parent
5d1fdcdbe2
commit
52a936d98b
|
@ -6336,10 +6336,12 @@ zr_free_window(struct zr_context *ctx, struct zr_window *win)
|
||||||
|
|
||||||
if (win == ctx->begin) {
|
if (win == ctx->begin) {
|
||||||
ctx->begin = win->next;
|
ctx->begin = win->next;
|
||||||
ctx->begin->prev = 0;
|
if (win->next)
|
||||||
|
ctx->begin->prev = 0;
|
||||||
} else if (win == ctx->end) {
|
} else if (win == ctx->end) {
|
||||||
ctx->end = win->prev;
|
ctx->end = win->prev;
|
||||||
ctx->end->next = 0;
|
if (win->prev)
|
||||||
|
ctx->end->next = 0;
|
||||||
} else {
|
} else {
|
||||||
if (win->next)
|
if (win->next)
|
||||||
win->next->prev = win->next;
|
win->next->prev = win->next;
|
||||||
|
|
Loading…
Reference in New Issue