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-22 00:25:58 +12:00 committed by GitHub
parent f6cfdfe881
commit dfc43bae18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,6 +213,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
#ifdef ARCH_ESP32
// Full shutdown of bluetooth hardware
if (nimbleBluetooth)
nimbleBluetooth->deinit();
#endif