From 56b417e5bcdf4f34ddcda8c7e56fbac6584e615e Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 07 十二月 2020 17:24:54 +0800 Subject: [PATCH] 2020-12-7-02 --- HDL_ON/Entity/FunctionList.cs | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index a48047a..d029aea 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -111,6 +111,11 @@ var functionDataBytes = FileUtils.ReadFile(filePath); var functionDataString = System.Text.Encoding.UTF8.GetString(functionDataBytes); var tempFunction = Newtonsoft.Json.JsonConvert.DeserializeObject<Function>(functionDataString); + if (tempFunction == null) + { + FileUtils.DeleteFile(filePath); + return; + } if (tempFunction.DeleteSign) { //todo 鍒犻櫎浜戠鏁版嵁 20201203--App涓嶈兘鍒犻櫎鍔熻兘鏁版嵁 -- Gitblit v1.8.0