summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/unix/cli.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index d484a0336f2..9f5862a036f 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -835,7 +835,7 @@ unix_cli_pager_redraw (unix_cli_file_t * cf, clib_file_t * uf)
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;
@@ -845,7 +845,8 @@ unix_cli_pager_add_line (unix_cli_file_t * cf, u8 * line, word len_or_index)
{
/* 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