mirror of
https://github.com/neovim/neovim.git
synced 2025-11-24 19:20:39 +00: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:
@@ -5813,6 +5813,7 @@ static void ex_tabonly(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(first_tabpage);
|
||||
if (first_tabpage->tp_next == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user