GTK3: Fixed access violation issue in Gtk3Page.

The widget was freed and assigned nil pointer before it was unreferenced
which may lead to occasional access violation on application shutdown.

This fix is related to #40713.
This commit is contained in:
Abou Al Montacir 2024-02-08 12:58:28 +01:00
parent db0a10f032
commit e5ba0c58f1

View File

@ -4525,9 +4525,9 @@ end;
procedure TGtk3Page.DestroyWidget;
begin
inherited DestroyWidget;
// unref it to allow it to be destroyed
FPageLabel^.unref;
inherited DestroyWidget;
end;
function TGtk3Page.getClientOffset: TPoint;