From 8db52bc296f662691a17aabeeabebd713e3b576d Mon Sep 17 00:00:00 2001
From: C3031 <shitiangui@lanpucloud.cn>
Date: 星期五, 06 三月 2026 16:53:08 +0800
Subject: [PATCH] Merge branch 'master' of http://lanpucloud.cn:1111/r/~zhengyabo/LB_TyreAppearanceInspectionSoftware

---
 LB_SmartVisionCommon/ConfigManager.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/LB_SmartVisionCommon/ConfigManager.cs b/LB_SmartVisionCommon/ConfigManager.cs
index 9815212..84d88e0 100644
--- a/LB_SmartVisionCommon/ConfigManager.cs
+++ b/LB_SmartVisionCommon/ConfigManager.cs
@@ -21,6 +21,16 @@
         /// <param name="filePath">鏂囦欢瀛樺偍璺緞浠ュ強鍚嶇О</param>
         public static void SaveConfig<T>(T config, string filePath)
         {
+            if (config == null)
+            {
+                AsyncLogHelper.Error(nameof(config));
+                throw new ArgumentNullException(nameof(config));
+            }
+            if (filePath == null)
+            {
+                AsyncLogHelper.Error(nameof(filePath));
+                AsyncLogHelper.Error(nameof(filePath));
+            }
             var json = JsonConvert.SerializeObject(config, Newtonsoft.Json.Formatting.Indented);
             File.WriteAllText(filePath, json);
         }

--
Gitblit v1.9.3