mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 21:41:34 +02:00
IDE: Check for non-existent components when filling component palette. Prevents crash when a package has been uninstalled.
git-svn-id: trunk@47242 -
This commit is contained in:
parent
3adae1d6f9
commit
f32fbcaf5d
@ -584,7 +584,8 @@ begin
|
||||
Assert(Assigned(fCompNames), 'TComponentPage.CreateButtons: fCompNames is not assigned.');
|
||||
for i := 0 to fCompNames.Count-1 do begin
|
||||
Comp := Pal.FindComponent(fCompNames[i]) as TPkgComponent;
|
||||
CreateOrDelButton(Comp, Format('%d_%d_',[fIndex,i]), ScrollBox);
|
||||
if Assigned(Comp) then
|
||||
CreateOrDelButton(Comp, Format('%d_%d_',[fIndex,i]), ScrollBox);
|
||||
end;
|
||||
fGuiCreated := True;
|
||||
end;
|
||||
@ -1083,8 +1084,7 @@ begin
|
||||
for CompI := 0 to CompNames.Count-1 do
|
||||
begin
|
||||
Comp := FindComponent(CompNames[CompI]);
|
||||
Assert(Assigned(Comp),
|
||||
Format('TComponentPalette.CreatePagesFromUserOrder: Comp %s not found.',[CompNames[CompI]]));
|
||||
if not Assigned(Comp) then Continue;
|
||||
Comp.RealPage := Pg;
|
||||
UserComps.AddObject(CompNames[CompI], Comp);
|
||||
if VoteCompVisibility(Comp) then
|
||||
|
Loading…
Reference in New Issue
Block a user