소스 검색

Update UGridUtils.pas

fixed possible bug of locking
PascalCoin 6 년 전
부모
커밋
8ecfa293da
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/gui-classic/UGridUtils.pas

+ 2 - 0
src/gui-classic/UGridUtils.pas

@@ -294,6 +294,7 @@ begin
         while (Not Terminated) and (i<FAccountsGridFilter.OrderedAccountsKeyList.Count)
           and ((FAccountsGridFilter.indexAccountsKeyList<0) or (FAccountsGridFilter.indexAccountsKeyList=i)) do begin
 
+          LNode.bank.SafeBox.StartThreadSafe;
           FAccountsGridFilter.OrderedAccountsKeyList.Lock; // Protection v4
           Try
             l := FAccountsGridFilter.OrderedAccountsKeyList.AccountKeyList[i];
@@ -312,6 +313,7 @@ begin
             end;
           finally
             FAccountsGridFilter.OrderedAccountsKeyList.Unlock;
+            LNode.Bank.SafeBox.EndThreadSave;
           end;
           inc(i);
         end;