From 480f1b14fe791f069a6efe0838cb9e137a30cf61 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 18 May 2021 18:12:58 +0200 Subject: [PATCH] Protect Radio from null phy --- lib/src/radio/radio.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index e84dc6e0d..fb0e46a98 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -995,7 +995,9 @@ void radio::handle_rf_msg(srsran_rf_error_t error) logger.info("Overflow"); // inform PHY about overflow - phy->radio_overflow(); + if (phy != nullptr) { + phy->radio_overflow(); + } } else if (error.type == srsran_rf_error_t::SRSRAN_RF_ERROR_UNDERFLOW) { rf_metrics.rf_u++; rf_metrics.rf_error = true;