SubGh: fix a race condition (#1376)
This commit is contained in:
parent
e17dae2d00
commit
c72b678510
@ -237,13 +237,13 @@ bool subghz_tx_rx_worker_start(SubGhzTxRxWorker* instance, uint32_t frequency) {
|
|||||||
|
|
||||||
instance->worker_running = true;
|
instance->worker_running = true;
|
||||||
|
|
||||||
furi_thread_start(instance->thread);
|
|
||||||
|
|
||||||
if(furi_hal_subghz_is_tx_allowed(frequency)) {
|
if(furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||||
instance->frequency = frequency;
|
instance->frequency = frequency;
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
furi_thread_start(instance->thread);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user