From 97c1b2d32ed06a186ce2f0f342c8d056ddb987a2 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 10 Dec 2013 15:47:46 +0100 Subject: Accessibility: Do not assert when a widget doesn't have a QAI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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 --- src/gui/accessible/qaccessible.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.3