1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-25 14:42:21 +01:00

[scheduler] Fix cancellation of timers with empty string names (#9641)

This commit is contained in:
J. Nick Koston
2025-07-17 16:20:35 -10:00
committed by GitHub
parent eb8a241a01
commit 158a3b2835
5 changed files with 123 additions and 12 deletions

View File

@@ -452,7 +452,7 @@ bool HOT Scheduler::cancel_item_(Component *component, bool is_static_string, co
// Helper to cancel items by name - must be called with lock held
bool HOT Scheduler::cancel_item_locked_(Component *component, const char *name_cstr, SchedulerItem::Type type) {
// Early return if name is invalid - no items to cancel
if (name_cstr == nullptr || name_cstr[0] == '\0') {
if (name_cstr == nullptr) {
return false;
}