mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 14:19:17 +02:00
Qt5: fixed crash with uninitialized menubar. issue #41271
This commit is contained in:
parent
8477f6087d
commit
7ae7202855
@ -1033,6 +1033,8 @@ begin
|
||||
if Assigned(TCustomForm(AWinControl).Menu) then
|
||||
begin
|
||||
AWin := TQtMainWindow(AWinControl.Handle);
|
||||
if Assigned(AWin.MenuBar) then
|
||||
begin
|
||||
AWin.MenuBar.sizeHint(@ASize);
|
||||
// geometry isn't updated yet
|
||||
if ASize.cy < 10 then
|
||||
@ -1049,6 +1051,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomForm.CanFocus(const AWinControl: TWinControl): Boolean;
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user