diff --git a/components/esp_timer/src/esp_timer.c b/components/esp_timer/src/esp_timer.c index fbabcfda4a00..5ef2bebfa903 100644 --- a/components/esp_timer/src/esp_timer.c +++ b/components/esp_timer/src/esp_timer.c @@ -621,7 +621,10 @@ int64_t IRAM_ATTR esp_timer_get_next_alarm_for_wake_up(void) return next_alarm; } -bool esp_timer_is_active(esp_timer_handle_t timer) +bool IRAM_ATTR esp_timer_is_active(esp_timer_handle_t timer) { + if (timer == NULL) { + return false; + } return timer_armed(timer); }