Qt: better check if variant is really valid handle.

git-svn-id: trunk@49211 -
This commit is contained in:
zeljko 2015-05-29 15:00:22 +00:00
parent 649ab6c422
commit adcc1a2862

View File

@ -388,7 +388,7 @@ begin
{$IFDEF CPU64}
Obj := TObject(QVariant_toULongLong(V, @Ok));
{$ENDIF}
if OK and (Obj <> nil) then
if OK and QtWidgetset.IsValidHandle(HWND(Obj)) then
begin
if not (Obj is TQtWidget) then
raise Exception.Create('QtObjectFromWidgetH: QObject_property returned '