Skip to content

Commit 2046936

Browse files
add null check (#3436)
1 parent 91c91ee commit 2046936

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

flixel/util/FlxSignal.hx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,15 @@ private class Macro
302302

303303
processingListeners = false;
304304

305-
for (handler in pendingRemove)
305+
if (pendingRemove != null)
306306
{
307-
removeHandler(handler);
307+
for (handler in pendingRemove)
308+
{
309+
removeHandler(handler);
310+
}
311+
if (pendingRemove.length > 0)
312+
pendingRemove = [];
308313
}
309-
if (pendingRemove.length > 0)
310-
pendingRemove = [];
311314
}
312315
}
313316
}

0 commit comments

Comments
 (0)