From 5ccc1a524b0555cf22341fecc85a45b133c3168e Mon Sep 17 00:00:00 2001 From: Ryoichiro Oka Date: Wed, 13 Nov 2024 20:06:13 +0900 Subject: [PATCH] fix null reference error on nexus --- Data/Scripts/PaintGun/Features/Palette/Palette.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Data/Scripts/PaintGun/Features/Palette/Palette.cs b/Data/Scripts/PaintGun/Features/Palette/Palette.cs index ec8243c..ebdaff5 100644 --- a/Data/Scripts/PaintGun/Features/Palette/Palette.cs +++ b/Data/Scripts/PaintGun/Features/Palette/Palette.cs @@ -437,6 +437,9 @@ void CheckLocalPaletteChanges() if(!Main.CheckPlayerField.Ready) return; + if (MyAPIGateway.Session.Player == null) + return; + List newColors = MyAPIGateway.Session.Player.BuildColorSlots; IReadOnlyList storedColors = LocalInfo.ColorsMasks;