diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-19 17:09:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-19 17:09:56 +0100 |
commit | 8c752bd6c4af54c0b7bac35a39acc2bf16015f85 (patch) | |
tree | d3d5fed20e6d7bb27a955eb129c8cfec0fc04bcb /src/fileio.c | |
parent | 4520d440c59034452d1450b27fcd56825c090687 (diff) |
patch 8.0.0486: crash and endless loop when closing windows in autocmdv8.0.0486
Problem: Crash and endless loop when closing windows in a SessionLoadPost
autocommand.
Solution: Check for valid tabpage. (partly neovim #6308)
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 32b2059f0e..e74392075b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -9033,6 +9033,11 @@ win_found: win_remove(curwin, NULL); aucmd_win_used = FALSE; last_status(FALSE); /* may need to remove last status line */ + + if (!valid_tabpage_win(curtab)) + /* no valid window in current tabpage */ + close_tabpage(curtab); + restore_snapshot(SNAP_AUCMD_IDX, FALSE); (void)win_comp_pos(); /* recompute window positions */ unblock_autocmds(); |