mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 03:42:01 +02:00
Qt: fixed segfault inside setPopupParent.related to issue #29247
git-svn-id: trunk@51019 -
This commit is contained in:
parent
93d8895785
commit
bbb3a9aa1d
@ -191,7 +191,7 @@ begin
|
||||
not (csDesigning in AForm.ComponentState))
|
||||
{$endif} then
|
||||
QtMainWindow.setShowInTaskBar(False);
|
||||
if Assigned(AForm.PopupParent) then
|
||||
if Assigned(AForm.PopupParent) and AForm.PopupParent.HandleAllocated then
|
||||
PopupParent := TQtWidget(AForm.PopupParent.Handle).Widget
|
||||
else
|
||||
PopupParent := nil;
|
||||
@ -334,7 +334,9 @@ class procedure TQtWSCustomForm.SetPopupParent(const ACustomForm: TCustomForm;
|
||||
var
|
||||
PopupParent: QWidgetH;
|
||||
begin
|
||||
if Assigned(APopupParent) then
|
||||
if not ACustomForm.HandleAllocated or (csDestroying in ACustomForm.ComponentState) then
|
||||
exit;
|
||||
if Assigned(APopupParent) and APopupParent.HandleAllocated then
|
||||
PopupParent := TQtWidget(APopupParent.Handle).Widget
|
||||
else
|
||||
PopupParent := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user