Skip to content

Commit

Permalink
gui render waits for init() to finish
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjum committed Jun 2, 2022
1 parent ad447d3 commit 4534c64
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4534c64

Please sign in to comment.