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:
Eliseo Martínez
2014-11-16 14:01:28 +01:00
parent f544d976fa
commit f47d52ea4f

View File

@@ -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;