fix crash if SD enabled but not inserted and sleep

This commit is contained in:
cyberman54 2022-11-14 14:40:08 +01:00
parent f3fdfda3fd
commit c07ca14e20

View File

@ -216,6 +216,8 @@ void sdcard_flush(void) {
} }
void sdcard_close(void) { void sdcard_close(void) {
if (!useSDCard)
return;
ESP_LOGI(TAG, "closing SD-card"); ESP_LOGI(TAG, "closing SD-card");
sdcard_flush(); sdcard_flush();
#ifdef SD_LOGGING #ifdef SD_LOGGING