瀏覽代碼

FIX: Logger crash (sync error)

Xing Cheng 3 年之前
父節點
當前提交
c9e1e18640
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Logger.cs

+ 2 - 1
Logger.cs

@@ -231,7 +231,8 @@ namespace Island.StandardLib
                 LogLine ll = new LogLine();
                 ll.lvl = level;
                 ll.str = str;
-                lines.Add(ll);
+                lock (lines)
+                    lines.Add(ll);
             }
         }