Skip to content

Commit

Permalink
SubGHz: properly working with missing external driver (#2821)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrZlo13 committed Jun 30, 2023
1 parent 88f8f68 commit e7bd547
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion applications/main/subghz/helpers/subghz_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e7bd547

Please sign in to comment.