diff options
author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2017-01-04 23:28:28 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2017-01-12 08:09:57 +0000 |
commit | 3ffc471385dfe6d489be10caa45c721633639060 (patch) | |
tree | 94be0e9ad566d22e200e1f1aa42529671c91973d /src/gui/accessible/qaccessibleobject.cpp | |
parent | 483ee17419a4f4bbdfa4369e703ef3a75b81531b (diff) |
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>
Diffstat (limited to 'src/gui/accessible/qaccessibleobject.cpp')
-rw-r--r-- | src/gui/accessible/qaccessibleobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index b67b8062ba..2ef8502ad5 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -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; |