Do not access invalid QAccessibleInterface
Noticed this when running Qt Creator against dev Change-Id: Ie75b2e0f2a77033ce0455d7ee3304193aa6e511c Reviewed-by: André de la Rocha <andre.rocha@qt.io>bb10
parent
be1e682572
commit
c4932f93d5
|
|
@ -153,7 +153,7 @@ void QWindowsUiaMainProvider::notifyValueChange(QAccessibleValueChangeEvent *eve
|
|||
int count = listacc->childCount();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
QAccessibleInterface *item = listacc->child(i);
|
||||
if (item && item->text(QAccessible::Name) == event->value()) {
|
||||
if (item && item->isValid() && item->text(QAccessible::Name) == event->value()) {
|
||||
if (!item->state().selected) {
|
||||
if (QAccessibleActionInterface *actionInterface = item->actionInterface())
|
||||
actionInterface->doAction(QAccessibleActionInterface::toggleAction());
|
||||
|
|
|
|||
Loading…
Reference in New Issue