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>
This commit is contained in:
parent
f217172d6d
commit
206e8f67a0
@ -1349,7 +1349,7 @@ QColor QAccessibleInterface::backgroundColor() const
|
|||||||
QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
|
QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
|
||||||
{
|
{
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
|
||||||
if (!iface) {
|
if (!iface || !iface->isValid()) {
|
||||||
static bool hasWarned = false;
|
static bool hasWarned = false;
|
||||||
if (!hasWarned) {
|
if (!hasWarned) {
|
||||||
qWarning() << "Problem creating accessible interface for: " << m_object << endl
|
qWarning() << "Problem creating accessible interface for: " << m_object << endl
|
||||||
|
Loading…
Reference in New Issue
Block a user