From 206e8f67a0db0dd6d98e591b099c728678b9b5a6 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 18 Mar 2013 15:45:41 +0100 Subject: Fix access to interface in QAccessibleEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes we get an invalid interface. In that case the event should just return 0. This avoids some potential crashes. Change-Id: I9f166b5d5547dbe7f22c4756502aee811b0b80a6 Reviewed-by: Jan Arve Sæther --- src/gui/accessible/qaccessible.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/accessible/qaccessible.cpp') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 4a998dc4b8..3468ebc8a7 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1349,7 +1349,7 @@ QColor QAccessibleInterface::backgroundColor() const QAccessibleInterface *QAccessibleEvent::accessibleInterface() const { QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object); - if (!iface) { + if (!iface || !iface->isValid()) { static bool hasWarned = false; if (!hasWarned) { qWarning() << "Problem creating accessible interface for: " << m_object << endl -- cgit v1.2.3