From 663c2165bde5747a8a5289aa456b49a9bbd26906 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 18 十月 2021 09:20:36 +0800
Subject: [PATCH] 2021-10-18 09:20:29

---
 HDL_ON/Entity/FunctionList.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index aee9ad3..593bb36 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -279,11 +279,14 @@
                         break;
 
                     case SPK.BrandType.Tuya:
-                        foreach (var function in Functions)
+                        lock (Functions)
                         {
-                            if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk))
+                            foreach (var function in Functions)
                             {
-                                resultFunctions.Add(function);
+                                if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk))
+                                {
+                                    resultFunctions.Add(function);
+                                }
                             }
                         }
                         break;

--
Gitblit v1.8.0