Hi,
I found bug in TsButton.
For reproducing you need to put TsButton on form, link TImageList to Images property, start and close application.
Issue details:
1. TsButton.Destroy do FreeAndNil(FCommonData);
2. TsButton.Destroy – goes into inherited Destroy;
3. TCustomButton.Destroy sets Images := nil;
4. TCustomButton.SetImages calls UpdateImageList;
5. TsButton.UpdateImageList calls FCommonData.Invalidate, but we already destroy it and it’s nil now. So we get AV.
Solution proposal:
procedure TsButton.UpdateImageList;
begin
if (Self <> nil) and not (csDestroying in Self.ComponentState) then
begin
inherited;
FCommonData.Invalidate;
end;
end;
Delphi 11.3 CE, Windows 11.
Attachments:
You must be
logged in to view attached files.