LCL: One more sanity check for a new Notebook page name. Issue #36957.

This commit is contained in:
Juha 2025-03-08 00:29:16 +02:00
parent da72bc4790
commit 43826bad9b

View File

@ -17,8 +17,9 @@ function CreateUniquePageName(BaseName: string; OwnerComp: TComponent): string;
var
i, j: integer;
begin
i:=0;
Result:=BaseName;
if (OwnerComp=nil) or (Result='') then exit;
i:=0;
while true do begin
j:=OwnerComp.ComponentCount-1;
while (j>=0) and (CompareText(Result,OwnerComp.Components[j].Name)<>0) do