Commit 138e14d7 authored by Dyami Caliri's avatar Dyami Caliri Committed by Friedemann Kleint
Browse files

Accessibility: Fix crash with invalid QAccessibleInterface


Windows accessibility can crash if it handles an event with an invalid
QAccessibleInterface pointer (one whose object has been deleted).

Task-number: QTBUG-41597
Change-Id: Iba099f7cb732fd00f18f04bd951c6cdd94785871
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarJan Arve Sæther <jan-arve.saether@digia.com>
No related merge requests found
Showing with 1 addition and 1 deletion
...@@ -159,7 +159,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) ...@@ -159,7 +159,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
// An event has to be associated with a window, // An event has to be associated with a window,
// so find the first parent that is a widget and that has a WId // so find the first parent that is a widget and that has a WId
QAccessibleInterface *iface = event->accessibleInterface(); QAccessibleInterface *iface = event->accessibleInterface();
if (!iface) // ### This should not happen, maybe make it an assert. if (!iface || !iface->isValid())
return; return;
QWindow *window = QWindowsAccessibility::windowHelper(iface); QWindow *window = QWindowsAccessibility::windowHelper(iface);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment