Accessibility: make sure childAt calls isValid

Generally isValid should be called by the bridge, but in this case, we
must verify the validity internally since we derefernce the interface
internally.

Task-number: QTBUG-52536
Change-Id: I14950118e58d65135bc38d77c23b8a7fed8bf39a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
bb10
Frederik Gladhorn 2017-01-04 23:28:28 +01:00
parent 483ee17419
commit 3ffc471385
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
for (int i = 0; i < childCount(); ++i) {
QAccessibleInterface *childIface = child(i);
Q_ASSERT(childIface);
if (childIface->rect().contains(x,y))
if (childIface->isValid() && childIface->rect().contains(x,y))
return childIface;
}
return 0;