mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
Fix warnings: window.c: tabline_height(): Np dereference: FP.
Problem : Dereference of null pointer @ 4978. Diagnostic : False positive. Rationale : tabline_height() shouldn't be called when a tab doesn't exist yet (this is, before initialization). Resolution : Assert function precondition.
This commit is contained in:
@@ -4976,6 +4976,7 @@ static void last_status_rec(frame_T *fr, int statusline)
|
|||||||
*/
|
*/
|
||||||
int tabline_height(void)
|
int tabline_height(void)
|
||||||
{
|
{
|
||||||
|
assert(first_tabpage);
|
||||||
switch (p_stal) {
|
switch (p_stal) {
|
||||||
case 0: return 0;
|
case 0: return 0;
|
||||||
case 1: return (first_tabpage->tp_next == NULL) ? 0 : 1;
|
case 1: return (first_tabpage->tp_next == NULL) ? 0 : 1;
|
||||||
|
Reference in New Issue
Block a user