mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 16:20:32 +02:00
Qt5,Qt6: fixed crash when QAction is destroyed before it's events are detached. issue #41618
(cherry picked from commit 5ca9daf80f
)
Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
parent
4c7e53d054
commit
6010559863
@ -16605,10 +16605,6 @@ begin
|
||||
FActions.Free;
|
||||
end;
|
||||
|
||||
if Assigned(FActionHandle) then
|
||||
QAction_Destroy(FActionHandle);
|
||||
FActionHandle := nil;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -16662,6 +16658,11 @@ begin
|
||||
QMenu_hook_destroy(FAboutToHideHook);
|
||||
FAboutToHideHook := nil;
|
||||
end;
|
||||
|
||||
if Assigned(FActionHandle) then
|
||||
QAction_Destroy(FActionHandle);
|
||||
FActionHandle := nil;
|
||||
|
||||
inherited DetachEvents;
|
||||
end;
|
||||
|
||||
|
@ -16519,10 +16519,6 @@ begin
|
||||
FActions.Free;
|
||||
end;
|
||||
|
||||
if Assigned(FActionHandle) then
|
||||
QAction_Destroy(FActionHandle);
|
||||
FActionHandle := nil;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -16576,6 +16572,11 @@ begin
|
||||
QMenu_hook_destroy(FAboutToHideHook);
|
||||
FAboutToHideHook := nil;
|
||||
end;
|
||||
|
||||
if Assigned(FActionHandle) then
|
||||
QAction_Destroy(FActionHandle);
|
||||
FActionHandle := nil;
|
||||
|
||||
inherited DetachEvents;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user