Skip to content

Commit 65603a3

Browse files
committed
fix dangling pointer per #6 last point - thanks!
1 parent 7982a7f commit 65603a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/esp8266/Schedule.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ void run_scheduled_functions()
103103
else
104104
{
105105
InterruptLock lockAllInterruptsInThisScope;
106+
106107
if (sFirst == item)
107108
sFirst = sFirst->mNext;
109+
else if (lastRecurring)
110+
lastRecurring->mNext = item->mNext;
111+
108112
if (sLast == item)
109113
sLast = lastRecurring;
110114

0 commit comments

Comments
 (0)