A resize can realloc so cannot cache the value of the list pointer.

This commit is contained in:
nicm
2020-04-18 17:20:25 +00:00
parent deffef6f13
commit 100db552d1
3 changed files with 40 additions and 36 deletions

View File

@ -227,10 +227,8 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
{
u_int tcx, tcy;
if (s->write_list != NULL) {
if (s->write_list != NULL)
screen_write_free_list(s);
s->write_list = NULL;
}
if (cx == NULL)
cx = &tcx;
@ -270,6 +268,9 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
}
log_debug("%s: cursor finished at %u,%u = %u,%u", __func__, s->cx,
s->cy, *cx, *cy);
if (s->write_list != NULL)
screen_write_make_list(s);
}
/* Resize screen. */