diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index 77ed5aa643..8869a958a5 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -1182,6 +1182,9 @@ bool DataFlash_File::io_thread_alive() const bool DataFlash_File::logging_failed() const { + if (!_initialised) { + return true; + } if (_open_error) { return true; }