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:
Eliseo Martínez 2015-04-30 10:42:05 +02:00
parent 33adbf3139
commit 1eaaff3fc5

View File

@ -5813,6 +5813,7 @@ static void ex_tabonly(exarg_T *eap)
break;
}
}
assert(first_tabpage);
if (first_tabpage->tp_next == NULL) {
break;
}