Cocoa: make accessibility hit test not crash
Check if the accessibility element is valid before calling childAt. Change-Id: Id63c11f18b262c3c3a839db8ee2d11c0d7adc822 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
parent
ff20caae2b
commit
f55ce22628
@ -239,6 +239,10 @@ static QAccessibleInterface *acast(void *ptr)
|
||||
|
||||
if (!accessibleInterface)
|
||||
return NSAccessibilityUnignoredAncestor(self);
|
||||
|
||||
if (!acast(accessibleInterface)->isValid())
|
||||
return NSAccessibilityUnignoredAncestor(self);
|
||||
|
||||
QAccessibleInterface *childInterface = acast(accessibleInterface)->childAt(point.x, qt_mac_flipYCoordinate(point.y));
|
||||
|
||||
// No child found, meaning we hit this element.
|
||||
|
Loading…
x
Reference in New Issue
Block a user