aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-02 13:27:54 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-02 13:27:54 +0200
commit64e9b2b7fcabbd816a48096a621cbec3abd93e4c (patch)
treed31f502865709c7558927a10ec1016801a340cee /src/main/java/at/hannibal2/skyhanni
parent3b3bac12a45b7b37b8b89db7e305b05bd3d8450a (diff)
downloadskyhanni-64e9b2b7fcabbd816a48096a621cbec3abd93e4c.tar.gz
skyhanni-64e9b2b7fcabbd816a48096a621cbec3abd93e4c.tar.bz2
skyhanni-64e9b2b7fcabbd816a48096a621cbec3abd93e4c.zip
fix npe
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index ce58f983e..97bba3099 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -431,7 +431,7 @@ object RenderUtils {
GlStateManager.pushMatrix()
val resolution = ScaledResolution(Minecraft.getMinecraft())
- val renderer = Minecraft.getMinecraft().renderManager.fontRenderer
+ val renderer = Minecraft.getMinecraft().renderManager.fontRenderer ?: return
val offsetX = (200 - renderer.getStringWidth(textToRender.removeColor())) / 2