From c72b678510facf34ad1fd48293709c1fa8bda1dd Mon Sep 17 00:00:00 2001 From: Astra <93453568+Astrrra@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:28:31 +0300 Subject: [PATCH] SubGh: fix a race condition (#1376) --- lib/subghz/subghz_tx_rx_worker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/subghz/subghz_tx_rx_worker.c b/lib/subghz/subghz_tx_rx_worker.c index 863aaa31e1f..0f687f15380 100644 --- a/lib/subghz/subghz_tx_rx_worker.c +++ b/lib/subghz/subghz_tx_rx_worker.c @@ -237,13 +237,13 @@ bool subghz_tx_rx_worker_start(SubGhzTxRxWorker* instance, uint32_t frequency) { instance->worker_running = true; - furi_thread_start(instance->thread); - if(furi_hal_subghz_is_tx_allowed(frequency)) { instance->frequency = frequency; res = true; } + furi_thread_start(instance->thread); + return res; }