diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-16 14:01:28 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-18 21:57:48 +0100 |
commit | f47d52ea4f260ad07e2eed8c7c2ae39a484dc282 (patch) | |
tree | 044f07829a73a4c02e772c96d94a0207b2f5df86 | |
parent | f544d976faf23649a5015eb25f3296f715a7a1bc (diff) | |
download | rneovim-f47d52ea4f260ad07e2eed8c7c2ae39a484dc282.tar.gz rneovim-f47d52ea4f260ad07e2eed8c7c2ae39a484dc282.tar.bz2 rneovim-f47d52ea4f260ad07e2eed8c7c2ae39a484dc282.zip |
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.
-rw-r--r-- | src/nvim/window.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |