diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2012-12-20 16:04:17 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-03 20:18:06 +0100 |
commit | 25c6908c80217ab7cae46e971ec5b04e3fab361e (patch) | |
tree | b09a8eefd5d29e77c6f1c5741b723f9af67999b1 /src/plugins/platforms | |
parent | 1b47059c886d76cc1a403e74abd034cce3b53a34 (diff) |
Do not crash in the bridge because of inconsistent hierarchy
Change-Id: I732b624b9918ff4ab59ef46322fd42167b438a8d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index f1bdc77303..5902f05663 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -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; } } } |