diff --git a/drivers/Ticker.cpp b/drivers/Ticker.cpp index 8c66f0b490..35c2ee43dd 100644 --- a/drivers/Ticker.cpp +++ b/drivers/Ticker.cpp @@ -43,7 +43,9 @@ void Ticker::setup(us_timestamp_t t) { void Ticker::handler() { insert_absolute(event.timestamp + _delay); - _function(); + if (_function) { + _function(); + } } } // namespace mbed