diff --git a/libraries/StorageManager/StorageManager.cpp b/libraries/StorageManager/StorageManager.cpp index 1811309488..c3bb826975 100644 --- a/libraries/StorageManager/StorageManager.cpp +++ b/libraries/StorageManager/StorageManager.cpp @@ -121,6 +121,9 @@ StorageAccess::StorageAccess(StorageManager::StorageType _type) : { // calculate available bytes total_size = 0; +#if AP_SDCARD_STORAGE_ENABLED + file = nullptr; +#endif for (uint8_t i=0; i