Qt: fixed crash when invalid or null handle is passed into SetCapture.

git-svn-id: trunk@38674 -
This commit is contained in:
zeljko 2012-09-15 18:06:11 +00:00
parent c309698bcb
commit 951b26f892

View File

@ -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);