From eb370642ab3697db06d31360460e191c1223d051 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 22 Sep 2020 10:36:08 +0200 Subject: [PATCH] verify cell selection observer is set before calling it --- srsue/src/stack/rrc/phy_controller.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsue/src/stack/rrc/phy_controller.cc b/srsue/src/stack/rrc/phy_controller.cc index 6850c181f..9da3aeeca 100644 --- a/srsue/src/stack/rrc/phy_controller.cc +++ b/srsue/src/stack/rrc/phy_controller.cc @@ -99,7 +99,9 @@ void phy_controller::selecting_cell::exit(phy_controller* f) // Signal result back to FSM that called cell selection bool result = csel_res.result; - f->cell_selection_always_observer(target_cell.earfcn, target_cell.pci, result); + if (f->cell_selection_always_observer) { + f->cell_selection_always_observer(target_cell.earfcn, target_cell.pci, result); + } f->task_sched.defer_task([f, result]() { f->cell_selection_once_observer(result); }); }