From 6526a119eb9f9b0fa264d5bc248ef6a257516647 Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Wed, 13 Sep 2023 13:10:17 -0700 Subject: [PATCH] fix crash due to null obj reference --- Ninjacrab.PersistentWindows.Solution/Common/DbKeySelect.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ninjacrab.PersistentWindows.Solution/Common/DbKeySelect.cs b/Ninjacrab.PersistentWindows.Solution/Common/DbKeySelect.cs index b79d4fd..e58ffb2 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/DbKeySelect.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/DbKeySelect.cs @@ -29,6 +29,8 @@ namespace PersistentWindows.Common private void ListLayout_SelectedIndexChanged(object sender, EventArgs e) { + if (ListLayout.SelectedItem == null) + return; selected.Text = ListLayout.SelectedItem.ToString(); } }