diff --git a/src/layer1.c b/src/layer1.c index 69d76e4..00eb470 100644 --- a/src/layer1.c +++ b/src/layer1.c @@ -294,8 +294,14 @@ int ph_data_req_hdlc(struct msgb *msg, struct v5x_interface *v5if) int ph_data_req_dl_cc(struct msgb *msg, void *cbdata) { struct v5x_interface *v5if = (struct v5x_interface *)cbdata; - struct e1inp_line *e1_line = v5if->cc_link->e1_line; + struct e1inp_line *e1_line; + if (!v5if->cc_link) { + msgb_free(msg); + return 0; + } + + e1_line = v5if->cc_link->e1_line; if (!e1_line) { msgb_free(msg); return 0;