mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 05:48:17 +02:00
* Keep old behaviour, but keep issue #40898 solved
This commit is contained in:
parent
97ad8fafd8
commit
58560d333e
@ -1946,11 +1946,16 @@ begin
|
||||
DupIgnore : Exit;
|
||||
DupError : Error(SDuplicateString,0)
|
||||
end;
|
||||
// Avoid crash in lazarus
|
||||
if Assigned(aObject) then
|
||||
InsertItem (Result,S,AObject)
|
||||
else
|
||||
InsertItem (Result,S);
|
||||
InsertItem (Result,S);
|
||||
if (aObject<>Nil) then
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Objects[Result]:=AObject;
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TStringList.Add(const S: string): Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user