Skip to content

Commit 70d045d

Browse files
committed
fix: prevent NullPointerException when resetting syncData.screen in ScreenSyncController
1 parent e3efcbc commit 70d045d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fabric/src/client/java/com/hpfxd/spectatorplus/fabric/client/sync/screen/ScreenSyncController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ public static void closeSyncedInventory() {
117117
syncedInventory = null;
118118
syncedWindowId = Integer.MIN_VALUE;
119119
isPendingOpen = false;
120-
syncData.screen = null;
120+
if (syncData != null) {
121+
syncData.screen = null;
122+
}
121123
}
122124

123125
public static void openPlayerInventory(Minecraft mc) {

0 commit comments

Comments
 (0)