SubGHz: properly working with missing external driver (#2821)

This commit is contained in:
Sergey Gavrilov 2023-06-30 20:56:41 +03:00 committed by GitHub
parent 88f8f68e29
commit e7bd547d05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);