From 7e6fd919dabd874902592040fce97a0f3257c29a Mon Sep 17 00:00:00 2001 From: luoxingjian <1010378449@qq.com> Date: Fri, 29 Nov 2024 14:16:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=84=A6=E7=82=B9=E8=A1=8C=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/View/Setting/HazardTypeForm.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PEIS/View/Setting/HazardTypeForm.cs b/PEIS/View/Setting/HazardTypeForm.cs index 8470c3f..0873839 100644 --- a/PEIS/View/Setting/HazardTypeForm.cs +++ b/PEIS/View/Setting/HazardTypeForm.cs @@ -150,7 +150,11 @@ namespace PEIS.View.Setting { int hazardTypeIndex = gVHazardType.FocusedRowHandle; var hazardTypeRow = gVHazardType.GetRow(hazardTypeIndex) as DictHazardType; - GetHTypeFItem?.Invoke(this, new Args() { Eid = hazardTypeRow.ID }); + if (hazardTypeRow!=null) + { + GetHTypeFItem?.Invoke(this, new Args() { Eid = hazardTypeRow.ID }); + } + } private void TsmiDelete_Click(object sender, EventArgs e) {