diff options
author | Maria Matejka <mq@jmq.cz> | 2021-09-08 15:30:09 +0000 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-10-13 19:09:04 +0200 |
commit | 8216ec3027d01b790e59a266227d378ba77a623e (patch) | |
tree | 78e09cb92f1c25ff473e4a6cd02ea5a04eea6c3b /nest | |
parent | 8ac20511e17af14d62cd84fcc4e460474820a584 (diff) |
There may be a symbol with NULL protocol when reconfiguring
Diffstat (limited to 'nest')
-rw-r--r-- | nest/proto.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nest/proto.c b/nest/proto.c index 31ee1fa1..7cfb1555 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -2243,8 +2243,13 @@ proto_apply_cmd_symbol(const struct symbol *s, void (* cmd)(struct proto *, uint return; } - cmd(s->proto->proto, arg, 0); - cli_msg(0, ""); + if (s->proto->proto) + { + cmd(s->proto->proto, arg, 0); + cli_msg(0, ""); + } + else + cli_msg(9002, "%s does not exist", s->name); } static void |