SITL: fixed SITL for example sketches

cope with no SITL object
This commit is contained in:
Andrew Tridgell 2014-12-02 12:57:13 +11:00
parent 9e731550fd
commit c5e4e8f035

View File

@ -209,7 +209,7 @@ void SITLScheduler::system_initialized() {
panic(
PSTR("PANIC: scheduler system initialized called more than once"));
}
if (_sitlState->_sitl->float_exception) {
if (_sitlState->_sitl == NULL || _sitlState->_sitl->float_exception) {
feenableexcept(FE_INVALID | FE_OVERFLOW | FE_DIVBYZERO);
} else {
feclearexcept(FE_INVALID | FE_OVERFLOW | FE_DIVBYZERO);