summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-10 15:47:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-02 11:33:06 +0100
commit97c1b2d32ed06a186ce2f0f342c8d056ddb987a2 (patch)
tree44f4bc7f5943f0250e6baa6cb73eac14a808fea3 /src/gui
parent631c3dbc800bb9b2e3b227c0a09523f0f7eef0b7 (diff)
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>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible.cpp2
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);