From 065674f3eea53cd84244dbb7ba1a994f86dde1ab Mon Sep 17 00:00:00 2001
From: C3031 <shitiangui@lanpucloud.cn>
Date: 星期五, 30 一月 2026 09:09:47 +0800
Subject: [PATCH] 

---
 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