Do not crash in the bridge because of inconsistent hierarchy
Change-Id: I732b624b9918ff4ab59ef46322fd42167b438a8d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>bb10
parent
1b47059c88
commit
25c6908c80
|
|
@ -767,9 +767,11 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accChild(VARIANT varChildI
|
|||
// actually ask for the same object. As a consequence, we need to clone ourselves:
|
||||
if (QAccessibleInterface *par = accessible->parent()) {
|
||||
const int indexOf = par->indexOfChild(accessible);
|
||||
QAccessibleInterface *clone = par->child(indexOf);
|
||||
if (indexOf == -1)
|
||||
qWarning() << "inconsistent hierarchy, parent:" << par << "child:" << accessible;
|
||||
else
|
||||
acc = par->child(indexOf);
|
||||
delete par;
|
||||
acc = clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue