Fix crash on shutdown, if Bluetooth not enabled (#3686)

Previously attempted to call deinit method for a nullptr
This commit is contained in:
todd-herbert
2024-04-21 07:25:58 -05:00
committed by GitHub
co-authored by GitHub
parent f6cfdfe881
commit dfc43bae18
+2 -1
View File
@@ -213,7 +213,8 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
#ifdef ARCH_ESP32
// Full shutdown of bluetooth hardware
nimbleBluetooth->deinit();
if (nimbleBluetooth)
nimbleBluetooth->deinit();
#endif
#ifdef ARCH_ESP32