Skip to content

Commit 363bb61

Browse files
committed
Pool spam fix
1 parent e2e434f commit 363bb61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/kotlin/com/lambda/gui/impl/clickgui/AbstractClickGui.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract class AbstractClickGui(name: String = "ClickGui") : LambdaGui(name, Cli
2424
fun scheduleAction(block: () -> Unit) = actionPool.add(block)
2525

2626
override fun onEvent(e: GuiEvent) {
27-
while (actionPool.isNotEmpty()) actionPool.last().invoke()
27+
while (actionPool.isNotEmpty()) actionPool.removeLast().invoke()
2828

2929
when (e) {
3030
is GuiEvent.Show -> {

0 commit comments

Comments
 (0)