From 13857c67e89f0e7d1eba4ae05546efcc0bde2ca7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Mar 2019 14:24:16 +0100 Subject: [PATCH] fix segfault RRU: check for nb_inst >0 before node_type --- targets/RT/USER/lte-softmodem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 8464e9747c..966b363822 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -688,7 +688,8 @@ int main( int argc, char **argv ) { RCconfig_L1(); } - if (RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU) { + if (RC.nb_inst > 0 + && (RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU)) { protocol_ctxt_t ctxt; ctxt.module_id = 0 ; ctxt.instance = 0;