From 3ffc471385dfe6d489be10caa45c721633639060 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 4 Jan 2017 23:28:28 +0100 Subject: Accessibility: make sure childAt calls isValid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gui/accessible/qaccessibleobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/accessible') 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; -- cgit v1.2.3