From af9f73590d7c7af39ee660c3c32f901933f7c92a Mon Sep 17 00:00:00 2001 From: Stuart Pomeroy Date: Sun, 11 Aug 2024 14:11:53 +0100 Subject: [PATCH] Fix null crash in artnet config --- .../theatrical/client/gui/screen/ArtNetConfigurationScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ArtNetConfigurationScreen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ArtNetConfigurationScreen.java index 93501dc..36df3ba 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ArtNetConfigurationScreen.java +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ArtNetConfigurationScreen.java @@ -302,7 +302,7 @@ private void renderLabels(GuiGraphics guiGraphics) { // renderLabel(guiGraphics, "artneti.notAuthorized", 5,75); // } else { if(TheatricalConfig.INSTANCE.CLIENT.artnetEnabled) { - if (TheatricalClient.getArtNetManager().getClient().hasReceivedPacket()) { + if (TheatricalClient.getArtNetManager().getClient() != null && TheatricalClient.getArtNetManager().getClient().hasReceivedPacket()) { long inSeconds = Math.round((float) (System.currentTimeMillis() - TheatricalClient.getArtNetManager().getClient().getLastPacketMS()) / 1000); renderLabel(guiGraphics, "artneti.lastReceived", -50, ipAddressBox.getY() + 5, inSeconds); } else {