From a3ef0d1246f9f0d52f8e705efa7300d68dd81ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 15 Mar 2016 21:39:46 +0100 Subject: vis: do not segfault when given a NULL command to process --- vis-cmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vis-cmds.c b/vis-cmds.c index 0fb31df..589595e 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -1246,6 +1246,8 @@ static const Command *lookup_cmd(Vis *vis, const char *name) { } bool vis_cmd(Vis *vis, const char *cmdline) { + if (!cmdline) + return true; enum CmdOpt opt = CMD_OPT_NONE; while (*cmdline == ':') cmdline++; -- cgit v1.2.3