mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:39:25 +02:00
Qt: fixed crash when invalid or null handle is passed into SetCapture.
git-svn-id: trunk@38674 -
This commit is contained in:
parent
c309698bcb
commit
951b26f892
@ -5538,7 +5538,7 @@ begin
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('[WinAPI SetCapture] Capture = ', Result, ' New capture = ', AHandle);
|
||||
{$endif}
|
||||
if Result <> 0 then
|
||||
if (Result <> 0) and IsValidHandle(AHandle) then
|
||||
begin
|
||||
Message.Msg := 0;
|
||||
FillChar(Message, SizeOf(Message), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user