diff --git a/lib/include/srslte/radio/radio_multi.h b/lib/include/srslte/radio/radio_multi.h index efb1e31b6..097fe55e2 100644 --- a/lib/include/srslte/radio/radio_multi.h +++ b/lib/include/srslte/radio/radio_multi.h @@ -45,7 +45,8 @@ namespace srslte { class radio_multi : public radio { public: - + radio_multi() {} + ~radio_multi() {} bool init_multi(uint32_t nof_rx_antennas, char *args = NULL, char *devname = NULL); bool rx_now(cf_t *buffer[SRSLTE_MAX_PORTS], uint32_t nof_samples, srslte_timestamp_t *rxd_time); }; diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index f7bd05862..117c626bc 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -81,7 +81,9 @@ bool radio::is_init() { void radio::stop() { - srslte_rf_close(&rf_device); + if (is_initialized) { + srslte_rf_close(&rf_device); + } } void radio::reset()