diff options
author | nicm <nicm> | 2020-04-18 17:20:25 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-18 17:20:25 +0000 |
commit | 100db552d16164648e269aeb45fd87f7a39d9c11 (patch) | |
tree | 1717d7989b3c65798232aa2094eb812643965172 /screen.c | |
parent | deffef6f1378db4986941dd9d83ba61f11142cd8 (diff) | |
download | rtmux-100db552d16164648e269aeb45fd87f7a39d9c11.tar.gz rtmux-100db552d16164648e269aeb45fd87f7a39d9c11.tar.bz2 rtmux-100db552d16164648e269aeb45fd87f7a39d9c11.zip |
A resize can realloc so cannot cache the value of the list pointer.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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. */ |