window: Silence clang-analyzer null dereference error (#5032)

This commit is contained in:
Daniel Xu
2016-07-11 21:43:06 -07:00
committed by Justin M. Keyes
parent dcbd1c7b13
commit 335be4272e

View File

@@ -3296,8 +3296,11 @@ void tabpage_move(int nr)
tabpage_T *tp;
tabpage_T *tp_dst;
if (first_tabpage->tp_next == NULL)
assert(curtab != NULL);
if (first_tabpage->tp_next == NULL) {
return;
}
for (tp = first_tabpage; tp->tp_next != NULL && n < nr; tp = tp->tp_next) {
++n;