From 3e916ac3a87ea9dabd1a2aee1c197d3d10bd3b25 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 9 Apr 2020 11:22:13 +0200 Subject: [PATCH] srsenb_phy: only wait for txrx thread if it has actually been started --- srsenb/src/phy/txrx.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srsenb/src/phy/txrx.cc b/srsenb/src/phy/txrx.cc index d66826d3d..c68185c0f 100644 --- a/srsenb/src/phy/txrx.cc +++ b/srsenb/src/phy/txrx.cc @@ -78,8 +78,10 @@ bool txrx::init(srslte::radio_interface_phy* radio_h_, void txrx::stop() { - running = false; - wait_thread_finish(); + if (running) { + running = false; + wait_thread_finish(); + } } void txrx::run_thread()