mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: ex_docmd.c: ex_tabonly(): Np dereference: FP.
Problem : Dereference of null pointer @ 5816. Diagnostic : False positive. Rationale : first_tabpage is assumed to be NULL after calling goto_tabpage(), which should not be possible (first_tabpage should be not NULL before calling it, and only changed to another valid tab page). Resolution : Assert first_tabpage after calling goto_tabpage(). Helped-by: oni-link <knil.ino@gmail.com>
This commit is contained in:
parent
33adbf3139
commit
1eaaff3fc5
@ -5813,6 +5813,7 @@ static void ex_tabonly(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(first_tabpage);
|
||||
if (first_tabpage->tp_next == NULL) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user