Check whether NimBLE is instantiated before using (#5015)

This commit is contained in:
todd-herbert 2024-10-10 22:37:25 +13:00 committed by GitHub
parent 1096973828
commit 0cbade989e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -497,7 +497,7 @@ void Screen::drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *sta
display->drawString(x + 20, y + 2, batteryPercent);
}
if (nimbleBluetooth->isConnected()) {
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
drawBluetoothConnectedIcon(display, display->getWidth() - 18, y + 2);
}
@ -729,7 +729,7 @@ void Screen::drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *stat
display->drawString(x + 20, y + 2, batteryPercent);
}
if (nimbleBluetooth->isConnected()) {
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
drawBluetoothConnectedIcon(display, display->getWidth() - 18, y + 2);
}