Prevent a crash when there is no accessible interface

Change-Id: I058b76ff9d40b75eb51f9a6b1b89032ead629aed
Reviewed-by: Liang Qi <liang.qi@digia.com>
This commit is contained in:
Andy Shaw 2013-12-20 09:56:01 +01:00 committed by The Qt Project
parent 436270e104
commit d54af5d3f6

View File

@ -240,7 +240,10 @@
// misc
- (BOOL)accessibilityIsIgnored {
return QCocoaAccessible::shouldBeIgnored(QAccessible::accessibleInterface(axid));
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid())
return true;
return QCocoaAccessible::shouldBeIgnored(iface);
}
- (id)accessibilityHitTest:(NSPoint)point {