Skip to content

Commit 1f8408e

Browse files
committed
Fix S3 startup due to ble_gap_adv_active crash
ble_gap_adv_active() crashes now when BLE hasn't been init. This is likely due to internal memory allocations in esp-nimble. So, check enabled before calling into it. Fixes #10849
1 parent ab84b9f commit 1f8408e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/espressif/common-hal/_bleio/Adapter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self) {
733733
}
734734

735735
bool common_hal_bleio_adapter_get_advertising(bleio_adapter_obj_t *self) {
736-
return ble_gap_adv_active();
736+
return common_hal_bleio_adapter_get_enabled(self) && ble_gap_adv_active();
737737
}
738738

739739
bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self) {

0 commit comments

Comments
 (0)