diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-08-17 17:49:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-08-17 17:49:22 +0000 |
| commit | 766e227e4fc343d8f2b9b7ee228b2cc7cfc60ee7 (patch) | |
| tree | b06fefea95e4cfc7bc05192b40c48bbf6bb9403b | |
| parent | terminal: keep saved SGR attributes per-grid (diff) | |
term: don't do a cursor refresh if we're shutting down
When running e.g. "foot true", we may reach a state where the window
has received the configure event, but we've also already decided to
shutdown. In this case, we may not have a grid (render_resize()
doesn't do anything when we've started the shutdown routine).
Fixes a race that triggers a crash.
| -rw-r--r-- | terminal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -523,7 +523,7 @@ term_arm_blink_timer(struct terminal *term) static void cursor_refresh(struct terminal *term) { - if (!term->window->is_configured) + if (unlikely(!term->window->is_configured || term->shutdown.in_progress)) return; term->grid->cur_row->cells[term->grid->cursor.point.col].attrs.clean = 0; |
