the format statement can return NULL before the pager has pages.
Change-Id: Ibabfd107e64fc9ab0eb142c28c155506f0d25828
Signed-off-by: Neale Ranns <nranns@cisco.com>
static void
unix_cli_pager_add_line (unix_cli_file_t * cf, u8 * line, word len_or_index)
{
- u8 *p;
+ u8 *p = NULL;
word i, j, k;
word line_index, len;
u32 width = cf->width;
{
/* Use a line already in the pager buffer */
line_index = len_or_index;
- p = cf->pager_vector[line_index];
+ if (cf->pager_vector != NULL)
+ p = cf->pager_vector[line_index];
len = vec_len (p);
}
else