From c2cf85df7092e941100236366038db14c8a514c0 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sun, 14 Dec 2025 04:01:12 +0100 Subject: [PATCH] PckStudio(BoxEditor) - Fix null reference exception when 'BoxVisibility' wasn't set --- PCK-Studio/Forms/Editor/BoxEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCK-Studio/Forms/Editor/BoxEditor.cs b/PCK-Studio/Forms/Editor/BoxEditor.cs index b04f134d..8eed7352 100644 --- a/PCK-Studio/Forms/Editor/BoxEditor.cs +++ b/PCK-Studio/Forms/Editor/BoxEditor.cs @@ -47,7 +47,7 @@ namespace PckStudio.Forms.Editor private void saveButton_Click(object sender, EventArgs e) { - SkinBOX.BoxVisibility visibility = Enum.TryParse(boxVisibilityComboBox.SelectedItem.ToString(), out SkinBOX.BoxVisibility v) ? v : default; + SkinBOX.BoxVisibility visibility = Enum.TryParse(boxVisibilityComboBox.SelectedItem?.ToString(), out SkinBOX.BoxVisibility v) ? v : default; Vector3 pos = new Vector3((float)PosXUpDown.Value, (float)PosYUpDown.Value, (float)PosZUpDown.Value); Vector3 size = new Vector3((float)SizeXUpDown.Value, (float)SizeYUpDown.Value, (float)SizeZUpDown.Value); Vector2 uv = new Vector2((int)uvXUpDown.Value, (int)uvYUpDown.Value);