Skip to content

Commit

Permalink
Make sure we get a valid accessibleInterface in child_helper.
Browse files Browse the repository at this point in the history
With filtering out more items from the tree of accessibles
make sure that if we get 0 returned we don't crash.

Change-Id: I7926ab66cd037952f7042dc46092cf5e2096d7c6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
  • Loading branch information
Frederik Gladhorn authored and Qt by Nokia committed Mar 23, 2012
1 parent edea70f commit 481e8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/accessible/quick/qaccessiblequickview.cpp
Expand Up @@ -127,7 +127,7 @@ static QQuickItem *childAt_helper(QQuickItem *item, int x, int y)
}

QScopedPointer<QAccessibleInterface> accessibleInterface(QAccessible::queryAccessibleInterface(item));
if (accessibleInterface->childCount() == 0) {
if (accessibleInterface && accessibleInterface->childCount() == 0) {
return (itemScreenRect(item).contains(x, y)) ? item : 0;
}

Expand Down

0 comments on commit 481e8bc

Please sign in to comment.