Skip to content

Commit 31f0576

Browse files
- Fixed TWorkerThread issue with wrong placed CancelValidation
1 parent 4623855 commit 31f0576

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Source/VirtualTrees.pas

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5977,10 +5977,6 @@ procedure ReleaseThreadReference(Tree: TBaseVirtualTree);
59775977
// Make sure there is no reference remaining to the releasing tree.
59785978
Tree.InterruptValidation;
59795979

5980-
// Borland change (used to debug shutdown issue with dangling FCurrentTree reference)
5981-
Assert(WorkerThread.FCurrentTree <> Tree, 'WorkerThread.FCurrentTree dangling reference!');
5982-
5983-
59845980
if WorkerThread.FRefCount = 0 then
59855981
begin
59865982
with WorkerThread do
@@ -6127,7 +6123,6 @@ procedure TWorkerThread.AddTree(Tree: TBaseVirtualTree);
61276123
finally
61286124
FWaiterList.UnlockList;
61296125
end;
6130-
CancelValidation(Tree);
61316126
end;
61326127

61336128
//----------------------------------------------------------------------------------------------------------------------
@@ -6143,6 +6138,7 @@ procedure TWorkerThread.RemoveTree(Tree: TBaseVirtualTree);
61436138
finally
61446139
FWaiterList.UnlockList;
61456140
end;
6141+
CancelValidation(Tree);
61466142
end;
61476143

61486144
//----------------- TBufferedAnsiString ------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)