diff --git a/mod/common/src/main/java/gjum/minecraft/mapsync/common/ModGui.java b/mod/common/src/main/java/gjum/minecraft/mapsync/common/ModGui.java index 9ef486ec..fc18d116 100644 --- a/mod/common/src/main/java/gjum/minecraft/mapsync/common/ModGui.java +++ b/mod/common/src/main/java/gjum/minecraft/mapsync/common/ModGui.java @@ -82,6 +82,10 @@ public void connectClicked(Button btn) { @Override public void render(@NotNull PoseStack poseStack, int i, int j, float f) { + // wait for init() to finish + if (syncServerAddressField == null) return; + if (syncServerConnectBtn == null) return; + renderBackground(poseStack); drawCenteredString(poseStack, font, title, width / 2, top, 0xFFFFFF); syncServerAddressField.render(poseStack, i, j, f);