diff options
-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 |