LCL: Workaround for RTL - ActionLink nil deref issue (fixed in FPC 3.3.1). See issue #41063

(cherry picked from commit aa9ce848b7)
This commit is contained in:
Martin 2024-12-17 12:26:34 +01:00
parent f246115506
commit b561ec5fe3
2 changed files with 9 additions and 0 deletions

View File

@ -263,6 +263,7 @@ type
procedure SetShortCut(Value: TShortCut); virtual;
procedure SetVisible(Value: Boolean); virtual;
public
function Update: Boolean; override;
function IsCaptionLinked: Boolean; virtual;
function IsCheckedLinked: Boolean; virtual;
function IsEnabledLinked: Boolean; virtual;

View File

@ -121,4 +121,12 @@ begin
end;
function TActionLink.Update: Boolean;
begin
{$IF FPC_Fullversion<30301} // Workaround for issue #41063 / Partial fix for actionlinks that inherit TActionLink only
if Assigned(Action) then
{$ENDIF}
Result := inherited Update;
end;
// included by actnlist.pas