summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2021-09-08 15:30:09 +0000
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commit8216ec3027d01b790e59a266227d378ba77a623e (patch)
tree78e09cb92f1c25ff473e4a6cd02ea5a04eea6c3b /nest
parent8ac20511e17af14d62cd84fcc4e460474820a584 (diff)
There may be a symbol with NULL protocol when reconfiguring
Diffstat (limited to 'nest')
-rw-r--r--nest/proto.c9
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