Qt5: proper check for handle

This commit is contained in:
Željan Rikalo 2022-04-29 16:33:28 +02:00
parent 9563473047
commit dc204837e6

View File

@ -203,7 +203,7 @@ begin
FID := nIDEvent;
FControl := FindControl(hWnd);
FHandle := hWnd;
if hWnd <> 0 then
if QtWidgetSet.IsValidHandle(hWnd) then
begin
FWidgetHook := QObject_hook_create(TQtWidget(hWnd).TheObject);
QObject_hook_hook_destroyed(FWidgetHook, @signalWidgetDestroyed);