diff --git a/CHANGELOG.md b/CHANGELOG.md index d84bc50a9..f0cc59947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -192,6 +192,7 @@ - Fix slashes in prefilled filename (by @WillyJL) - Handle PPS request in ISO14443-4 layer (by @WillyJL) - FBT: Fix redundant decl for apps using an icon disabled in API (by @WillyJL) +- CLI: Fix missing cleanup for subghz chat on region restricted frequencies (by @WillyJL) - UL: Sub-GHz: Fix crash in add manually menu (by @xMasterX) - Clangd: Add clangd parameters in IDE agnostic config file (by @WillyJL) - OFW: GUI: Fix Number Input Save Icon (by @zinongli) diff --git a/applications/main/subghz/subghz_cli.c b/applications/main/subghz/subghz_cli.c index c3b4f3586..c9e66c934 100644 --- a/applications/main/subghz/subghz_cli.c +++ b/applications/main/subghz/subghz_cli.c @@ -941,6 +941,13 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) { return; } } + if(!furi_hal_region_is_frequency_allowed(frequency)) { + printf( + "In your settings/region, only reception on this frequency (%lu) is allowed,\r\n" + "the actual operation of the application is not possible\r\n ", + frequency); + return; + } subghz_devices_init(); const SubGhzDevice* device = subghz_cli_command_get_device(&device_ind); if(!subghz_devices_is_frequency_valid(device, frequency)) { @@ -950,13 +957,6 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) { subghz_cli_radio_device_power_off(); return; } - if(!furi_hal_region_is_frequency_allowed(frequency)) { - printf( - "In your settings/region, only reception on this frequency (%lu) is allowed,\r\n" - "the actual operation of the application is not possible\r\n ", - frequency); - return; - } SubGhzChatWorker* subghz_chat = subghz_chat_worker_alloc(pipe);