diff options
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index dccf3e2efc..27fb160035 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2001,6 +2001,10 @@ void win_free_all(void) while (firstwin != NULL) (void)win_free_mem(firstwin, &dummy, NULL); + + // No window should be used after this. Set curwin to NULL to crash + // instead of using freed memory. + curwin = NULL; } #endif |