From: Frederik Gladhorn Date: Fri, 23 Mar 2012 18:28:12 +0000 (+0100) Subject: Make sure we get a valid accessibleInterface in child_helper. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=481e8bc63ccdb9b29dac69bde0344d9b9b7b217c;p=konrad%2Fqtdeclarative.git Make sure we get a valid accessibleInterface in child_helper. 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 --- diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp index 4b31c2e..2df1f24 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp @@ -127,7 +127,7 @@ static QQuickItem *childAt_helper(QQuickItem *item, int x, int y) } QScopedPointer accessibleInterface(QAccessible::queryAccessibleInterface(item)); - if (accessibleInterface->childCount() == 0) { + if (accessibleInterface && accessibleInterface->childCount() == 0) { return (itemScreenRect(item).contains(x, y)) ? item : 0; }