diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-15 21:39:46 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-15 21:39:46 +0100 |
| commit | a3ef0d1246f9f0d52f8e705efa7300d68dd81ac3 (patch) | |
| tree | b7ebb66c30a42d6f2f89e7b2b1b53f08afb09cc6 /vis-cmds.c | |
| parent | 3cb675f804600c3215b97698d6c42b90e07b6c9d (diff) | |
| download | vis-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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++; |
