From b07cb9401f1bd4a6a8442e03e88dff75731a6c2a Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:48:08 +0300 Subject: [PATCH] subghz raw protocol fixes by WillyJL --- lib/subghz/protocols/raw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/subghz/protocols/raw.c b/lib/subghz/protocols/raw.c index 96908130e..326576bde 100644 --- a/lib/subghz/protocols/raw.c +++ b/lib/subghz/protocols/raw.c @@ -291,9 +291,11 @@ void subghz_protocol_encoder_raw_stop(void* context) { furi_check(context); SubGhzProtocolEncoderRAW* instance = context; instance->is_running = false; - if(subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) { + if(instance->file_worker_encoder && + subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) { subghz_file_encoder_worker_stop(instance->file_worker_encoder); subghz_file_encoder_worker_free(instance->file_worker_encoder); + instance->file_worker_encoder = NULL; } } @@ -318,6 +320,7 @@ void subghz_protocol_raw_file_encoder_worker_set_callback_end( static bool subghz_protocol_encoder_raw_worker_init(SubGhzProtocolEncoderRAW* instance) { furi_assert(instance); + furi_check(!instance->file_worker_encoder); instance->file_worker_encoder = subghz_file_encoder_worker_alloc(); if(subghz_file_encoder_worker_start(