diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-10 15:47:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-02 11:33:06 +0100 |
commit | 97c1b2d32ed06a186ce2f0f342c8d056ddb987a2 (patch) | |
tree | 44f4bc7f5943f0250e6baa6cb73eac14a808fea3 | |
parent | 631c3dbc800bb9b2e3b227c0a09523f0f7eef0b7 (diff) | |
download | qtbase-97c1b2d32ed06a186ce2f0f342c8d056ddb987a2.tar.gz |
Accessibility: Do not assert when a widget doesn't have a QAI
[ChangeLog][QtGui] Fixed crash when sending accessibility updates when
the corresponding widget does not have a corresponding
QAccessibleInterface. This showed on Mac for example with QStatusBar.
Task-number: QTBUG-35421
Change-Id: I94174e98e858b7a0122532ee5fcc8458a263bccd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 5d28512697..dffdfa889a 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1313,6 +1313,8 @@ QAccessible::Id QAccessibleEvent::uniqueId() const if (!m_object) return m_uniqueId; QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object); + if (!iface) + return 0; if (m_child != -1) iface = iface->child(m_child); return QAccessible::uniqueId(iface); |