summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-03-18 15:45:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-23 16:47:28 +0100
commit206e8f67a0db0dd6d98e591b099c728678b9b5a6 (patch)
tree016ea65efce0631e0c4808d77301cb40e06edb27
parentf217172d6dbd485cdacefb3dacd8b16eda5a1945 (diff)
Fix access to interface in QAccessibleEvent
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 <jan-arve.saether@digia.com>
-rw-r--r--src/gui/accessible/qaccessible.cpp2
1 files changed, 1 insertions, 1 deletions
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