mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 12:09:18 +02:00
* Patch from Ondrej Pokorny to make RegisterClassAlias thread-safe
git-svn-id: trunk@41818 -
This commit is contained in:
parent
6bfaec84eb
commit
60606e61ef
@ -44,9 +44,14 @@ procedure RegisterClassAlias(AClass: TPersistentClass; const Alias: string);
|
|||||||
var
|
var
|
||||||
I : integer;
|
I : integer;
|
||||||
begin
|
begin
|
||||||
i := ClassAliasList.IndexOf(Alias);
|
ClassList.LockList;
|
||||||
if I = -1 then
|
try
|
||||||
ClassAliasList.AddObject( Alias, TObject(AClass) );
|
i := ClassAliasList.IndexOf(Alias);
|
||||||
|
if I = -1 then
|
||||||
|
ClassAliasList.AddObject( Alias, TObject(AClass) );
|
||||||
|
finally
|
||||||
|
ClassList.UnlockList;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user