aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-03-15 21:39:46 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-03-15 21:39:46 +0100
commita3ef0d1246f9f0d52f8e705efa7300d68dd81ac3 (patch)
treeb7ebb66c30a42d6f2f89e7b2b1b53f08afb09cc6 /vis-cmds.c
parent3cb675f804600c3215b97698d6c42b90e07b6c9d (diff)
downloadvis-a3ef0d1246f9f0d52f8e705efa7300d68dd81ac3.tar.gz
vis-a3ef0d1246f9f0d52f8e705efa7300d68dd81ac3.tar.xz
vis: do not segfault when given a NULL command to process
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c2
1 files changed, 2 insertions, 0 deletions
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++;