Do not crash in the windows accessibility bridge

If the object did not have a QAccessibleInterface subclass it would
crash in the windows accessibility bridge.

Change-Id: I931d69466a5a74a87f1c1c577fb1c918dcc8accf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
Jan-Arve Saether 2011-12-20 13:32:01 +01:00 committed by Qt by Nokia
parent 54c487cdd2
commit f718728567

View File

@ -1404,7 +1404,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QObject *o, int who, QAcce
// An event has to be associated with a window,
// so find the first parent that is a widget and that has a WId
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(o);
QWindow *window = window_helper(iface);
QWindow *window = iface ? window_helper(iface) : 0;
if (!window) {
window = QGuiApplication::activeWindow();