mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 20:00:27 +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))
|
not (csDesigning in AForm.ComponentState))
|
||||||
{$endif} then
|
{$endif} then
|
||||||
QtMainWindow.setShowInTaskBar(False);
|
QtMainWindow.setShowInTaskBar(False);
|
||||||
if Assigned(AForm.PopupParent) then
|
if Assigned(AForm.PopupParent) and AForm.PopupParent.HandleAllocated then
|
||||||
PopupParent := TQtWidget(AForm.PopupParent.Handle).Widget
|
PopupParent := TQtWidget(AForm.PopupParent.Handle).Widget
|
||||||
else
|
else
|
||||||
PopupParent := nil;
|
PopupParent := nil;
|
||||||
@ -334,7 +334,9 @@ class procedure TQtWSCustomForm.SetPopupParent(const ACustomForm: TCustomForm;
|
|||||||
var
|
var
|
||||||
PopupParent: QWidgetH;
|
PopupParent: QWidgetH;
|
||||||
begin
|
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
|
PopupParent := TQtWidget(APopupParent.Handle).Widget
|
||||||
else
|
else
|
||||||
PopupParent := nil;
|
PopupParent := nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user