mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-03 09:58:32 +02:00
Qt: better check if variant is really valid handle.
git-svn-id: trunk@49211 -
This commit is contained in:
parent
649ab6c422
commit
adcc1a2862
@ -388,7 +388,7 @@ begin
|
|||||||
{$IFDEF CPU64}
|
{$IFDEF CPU64}
|
||||||
Obj := TObject(QVariant_toULongLong(V, @Ok));
|
Obj := TObject(QVariant_toULongLong(V, @Ok));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if OK and (Obj <> nil) then
|
if OK and QtWidgetset.IsValidHandle(HWND(Obj)) then
|
||||||
begin
|
begin
|
||||||
if not (Obj is TQtWidget) then
|
if not (Obj is TQtWidget) then
|
||||||
raise Exception.Create('QtObjectFromWidgetH: QObject_property returned '
|
raise Exception.Create('QtObjectFromWidgetH: QObject_property returned '
|
||||||
|
Loading…
Reference in New Issue
Block a user