HAL_ChibiOS: check for logger instance before use

This commit is contained in:
Andrew Tridgell 2019-02-12 07:41:09 +11:00
parent 7c61d66d75
commit 57c573552c

View File

@ -238,7 +238,9 @@ void Scheduler::reboot(bool hold_in_bootloader)
#ifndef NO_DATAFLASH
//stop logging
AP::logger().StopLogging();
if (AP_Logger::get_singleton()) {
AP::logger().StopLogging();
}
// stop sdcard driver, if active
sdcard_stop();