diff --git a/lib/subghz/protocols/raw.c b/lib/subghz/protocols/raw.c index a6aaa3585..71cb18b9a 100644 --- a/lib/subghz/protocols/raw.c +++ b/lib/subghz/protocols/raw.c @@ -292,9 +292,9 @@ void* subghz_protocol_encoder_raw_alloc(SubGhzEnvironment* environment) { void subghz_protocol_encoder_raw_stop(void* context) { furi_check(context); SubGhzProtocolEncoderRAW* instance = context; - furi_check(instance->file_worker_encoder); 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;