From f47d52ea4f260ad07e2eed8c7c2ae39a484dc282 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Sun, 16 Nov 2014 14:01:28 +0100 Subject: 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. --- src/nvim/window.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index 63c46f243e..315d5f07de 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4976,6 +4976,7 @@ static void last_status_rec(frame_T *fr, int statusline) */ int tabline_height(void) { + assert(first_tabpage); switch (p_stal) { case 0: return 0; case 1: return (first_tabpage->tp_next == NULL) ? 0 : 1; -- cgit