diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-14 20:21:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-14 20:21:55 +0100 |
commit | 02764713a715c55e316e2bef5c9ade2fb767ee78 (patch) | |
tree | 64ab70ce1fa3c4af464254695b54aa46529fac82 /src/terminal.c | |
parent | 33aecb1f2c85711d53858b71f5f3c2cbe076435f (diff) | |
download | vim-git-02764713a715c55e316e2bef5c9ade2fb767ee78.tar.gz |
patch 8.2.1985: crash when closing terminal popup with <Cmd> mappingv8.2.1985
Problem: Crash when closing terminal popup with <Cmd> mapping.
Solution: Check b_term is not NULL. (closes #7294)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/terminal.c b/src/terminal.c index 4e2ff14dd..7f38bf75c 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -2527,7 +2527,7 @@ terminal_loop(int blocking) while (blocking || vpeekc_nomap() != NUL) { #ifdef FEAT_GUI - if (!curbuf->b_term->tl_system) + if (curbuf->b_term != NULL && !curbuf->b_term->tl_system) #endif // TODO: skip screen update when handling a sequence of keys. // Repeat redrawing in case a message is received while redrawing. @@ -2542,8 +2542,6 @@ terminal_loop(int blocking) restore_cursor = TRUE; raw_c = term_vgetc(); -if (raw_c > 0) - ch_log(NULL, "terminal_loop() got %d", raw_c); if (!term_use_loop_check(TRUE) || in_terminal_loop != curbuf->b_term) { // Job finished while waiting for a character. Push back the |