From f3d291e180af1bc9655a8cc5e3ca6d0a11eb2e88 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sun, 11 Apr 2021 09:39:38 +0200 Subject: [PATCH] Test if the poseStack argument in the render method of ClickBox.kt is null. --- common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt index b627a19..25c9d94 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt @@ -24,7 +24,7 @@ class ClickBox(x: Double, y: Double, private val name: TranslatableComponent? = RenderSystem.enableTexture() RenderSystem.disableBlend() - if (name != null) { + if ((name != null) && (poseStack != null)) { Minecraft.getInstance().font.draw(poseStack, name.string, x.toFloat() + 2, y.toFloat() + 1.5F, TransparentColor) } }