From 0cbade989e65e95df5af88228de84f044e27a640 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Thu, 10 Oct 2024 22:37:25 +1300 Subject: [PATCH] Check whether NimBLE is instantiated before using (#5015) --- src/graphics/Screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ad42fa979..3c0230330 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -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); }