diff src/window.c @ 11191:445fd6be2009 v8.0.0482

patch 8.0.0482: the setbufvar() function may mess up the window layout commit https://github.com/vim/vim/commit/2c90d51123fba44a90e09aa4a4f2b7d972dadb94 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 18 22:35:30 2017 +0100 patch 8.0.0482: the setbufvar() function may mess up the window layout Problem: The setbufvar() function may mess up the window layout. (Kay Z.) Solution: Do not check the window to be valid if it is NULL.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Mar 2017 22:45:05 +0100
parents 506f5d8b7d8b
children 75ccc8a15a51
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -6563,7 +6563,7 @@ check_snapshot_rec(frame_T *sn, frame_T 
 		&& check_snapshot_rec(sn->fr_next, fr->fr_next) == FAIL)
 	    || (sn->fr_child != NULL
 		&& check_snapshot_rec(sn->fr_child, fr->fr_child) == FAIL)
-	    || !win_valid(sn->fr_win))
+	    || (sn->fr_win != NULL && !win_valid(sn->fr_win)))
 	return FAIL;
     return OK;
 }