mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 05:28:17 +02:00
LCL: One more sanity check for a new Notebook page name. Issue #36957.
This commit is contained in:
parent
adf11362e1
commit
fa2ad4f983
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user