From e7bd547d05c9cb70c5da26caa39ad1efcfd04e74 Mon Sep 17 00:00:00 2001 From: Sergey Gavrilov Date: Fri, 30 Jun 2023 20:56:41 +0300 Subject: [PATCH] SubGHz: properly working with missing external driver (#2821) --- applications/main/subghz/helpers/subghz_txrx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/main/subghz/helpers/subghz_txrx.c b/applications/main/subghz/helpers/subghz_txrx.c index f117d3974..b911f4434 100644 --- a/applications/main/subghz/helpers/subghz_txrx.c +++ b/applications/main/subghz/helpers/subghz_txrx.c @@ -552,7 +552,10 @@ bool subghz_txrx_radio_device_is_external_connected(SubGhzTxRx* instance, const subghz_txrx_radio_device_power_on(instance); } - is_connect = subghz_devices_is_connect(subghz_devices_get_by_name(name)); + const SubGhzDevice* device = subghz_devices_get_by_name(name); + if(device) { + is_connect = subghz_devices_is_connect(device); + } if(!is_otg_enabled) { subghz_txrx_radio_device_power_off(instance);