mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 16:37:54 +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
|
var
|
||||||
i, j: integer;
|
i, j: integer;
|
||||||
begin
|
begin
|
||||||
i:=0;
|
|
||||||
Result:=BaseName;
|
Result:=BaseName;
|
||||||
|
if (OwnerComp=nil) or (Result='') then exit;
|
||||||
|
i:=0;
|
||||||
while true do begin
|
while true do begin
|
||||||
j:=OwnerComp.ComponentCount-1;
|
j:=OwnerComp.ComponentCount-1;
|
||||||
while (j>=0) and (CompareText(Result,OwnerComp.Components[j].Name)<>0) do
|
while (j>=0) and (CompareText(Result,OwnerComp.Components[j].Name)<>0) do
|
||||||
|
Loading…
Reference in New Issue
Block a user