mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 11:00:33 +02:00
Qt: check if sender is destroyed during mouse events, otherwise we have access violation. issue #18540
git-svn-id: trunk@29061 -
This commit is contained in:
parent
af36765fe9
commit
378ac9c3b4
@ -2776,7 +2776,10 @@ begin
|
||||
end;
|
||||
NotifyApplicationUserInput(Msg.Msg);
|
||||
DeliverMessage(Msg);
|
||||
SetNoMousePropagation(QWidgetH(Sender), True);
|
||||
// Check if our objects exists since LCL can destroy object during
|
||||
// mouse events...
|
||||
if CanSendLCLMessage and (Sender <> nil) then
|
||||
SetNoMousePropagation(QWidgetH(Sender), True);
|
||||
end;
|
||||
QEventMouseButtonRelease:
|
||||
begin
|
||||
@ -2791,7 +2794,11 @@ begin
|
||||
|
||||
NotifyApplicationUserInput(Msg.Msg);
|
||||
DeliverMessage(Msg);
|
||||
SetNoMousePropagation(QWidgetH(Sender), True);
|
||||
|
||||
// Check if our objects exists since LCL can destroy object during
|
||||
// mouse events...
|
||||
if CanSendLCLMessage and (Sender <> nil) then
|
||||
SetNoMousePropagation(QWidgetH(Sender), True);
|
||||
|
||||
{ Clicking on buttons operates differently, because QEventMouseButtonRelease
|
||||
is sent if you click a control, drag the mouse out of it and release, but
|
||||
|
Loading…
Reference in New Issue
Block a user