[BLE] Fix crash if BLE stack is not initialized when setting advertising. (#2212)
This commit is contained in:
1 parent
4166d2ab68
commit
a0d5b7d181
1 file changed
+4
@@ -202,6 +202,10 @@ void stop_connection_timer() {}
|
||||
# endif
|
||||
|
||||
void set_blufi_mfg_data () {
|
||||
if (!NimBLEDevice::isInitialized() || !NimBLEDevice::getAdvertising()->isAdvertising()) {
|
||||
Log.notice(F("Unable to set advertising data" CR));
|
||||
return;
|
||||
}
|
||||
ble_hs_adv_fields fields;
|
||||
ble_uuid16_t blufi_uuid = BLE_UUID16_INIT(BLUFI_APP_UUID);
|
||||
memset(&fields, 0, sizeof(fields));
|
||||
|
||||
Reference in new issue
Block a user