Qt5: better check for dangling handle pointer.

git-svn-id: trunk@54113 -
This commit is contained in:
zeljko 2017-02-07 16:56:47 +00:00
parent 5dfff39ac5
commit f439ee0b2f

View File

@ -294,7 +294,8 @@ begin
Result := False;
if not WSCheckHandleAllocated(AWincontrol, 'GetText') then
Exit;
if not QtWidgetSet.IsValidHandle(AWinControl.Handle) then
exit;
Result := not TQtWidget(AWinControl.Handle).getTextStatic;
if Result then
AText := UTF16ToUTF8(TQtWidget(AWinControl.Handle).getText);