LazReport: fix Access Violation on deleting object which has been previously renamed, issue #30206

git-svn-id: trunk@52434 -
This commit is contained in:
jesus 2016-06-04 06:44:23 +00:00
parent f585e29ca1
commit ea8917f49a

View File

@ -7603,18 +7603,16 @@ begin
if (Obj=nil) or (Obj is TPersistent) then
begin
FSelectedObject:=Obj;
if Obj=nil then
fPropertyGrid.Selection := nil
else
begin
fcboxObjList.ItemIndex := fcboxObjList.Items.IndexOfObject(Obj);
NewSel := TPersistentSelectionList.Create;
try
NewSel := TPersistentSelectionList.Create;
try
if Obj<>nil then
begin
fcboxObjList.ItemIndex := fcboxObjList.Items.IndexOfObject(Obj);
NewSel.Add(TfrView(Obj));
fPropertyGrid.Selection := NewSel;
finally
NewSel.Free;
end;
fPropertyGrid.Selection := NewSel
finally
NewSel.Free;
end;
end
else