File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
common/src/main/kotlin/com/lambda/gui/api Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import com.lambda.graphics.animation.AnimationTicker
99import com.lambda.gui.api.component.core.IComponent
1010import com.lambda.gui.impl.AbstractClickGui
1111import com.lambda.module.Module
12+ import com.lambda.threading.runSafe
1213import com.lambda.util.KeyCode
1314import com.lambda.util.Mouse
1415import com.lambda.util.Nameable
@@ -79,14 +80,16 @@ abstract class LambdaGui(
7980 override fun removed () {
8081 onEvent(GuiEvent .Hide ())
8182
82- // quick crashfix (is there any other way to prevent gui being closed twice?)
83- mc.currentScreen = null
84- owner?.disable()
85- mc.currentScreen = this
83+ runSafe {
84+ // quick crashfix (is there any other way to prevent gui being closed twice?)
85+ mc.currentScreen = null
86+ owner?.disable()
87+ mc.currentScreen = this @LambdaGui
8688
87- closingAction?.let {
88- recordRenderCall(it)
89- closingAction = null
89+ closingAction?.let {
90+ recordRenderCall(it)
91+ closingAction = null
92+ }
9093 }
9194 }
9295
You can’t perform that action at this time.
0 commit comments