aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-31 10:53:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-07 15:33:31 +0000
commit0cbdf657a78d2932ef9435f53645c7bb9a4cd28a (patch)
tree7a80e4716dd6f6c924b0cf8dd75c3256820430c8 /terminal.c
parentrender: urls: positioning: place a bit further away from the starting position (diff)
term: destroy: set term->window = NULL after destroying it
This fixes a crash in urls_reset() on destroy, where we tried to access an already free:d window pointer in order to destroy the jump label surfaces.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 1eed0966..624b7a21 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1405,8 +1405,10 @@ term_destroy(struct terminal *term)
fdm_del(term->fdm, term->flash.fd);
fdm_del(term->fdm, term->ptmx);
- if (term->window != NULL)
+ if (term->window != NULL) {
wayl_win_destroy(term->window);
+ term->window = NULL;
+ }
mtx_lock(&term->render.workers.lock);
xassert(tll_length(term->render.workers.queue) == 0);