mirror of https://github.com/qt/qtbase.git
Android: Fix for accessibility potential crash
When accessibility was not active it was possible to force its update, causing a null pointer exception in java. Pick-to: 6.0 5.15 Change-Id: I60f65612d6e9f712ba3c591ffcc6803f06f09efb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
7a4e686240
commit
fe51137f85
|
@ -203,6 +203,8 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
|||
|
||||
public void notifyObjectFocus(int viewId)
|
||||
{
|
||||
if (m_view == null)
|
||||
return;
|
||||
m_view.invalidate();
|
||||
sendEventForVirtualViewId(viewId,
|
||||
AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED);
|
||||
|
|
|
@ -52,7 +52,7 @@ QAndroidPlatformAccessibility::~QAndroidPlatformAccessibility()
|
|||
|
||||
void QAndroidPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
|
||||
{
|
||||
if (event == nullptr || !event->accessibleInterface())
|
||||
if (!isActive() || event == nullptr || !event->accessibleInterface())
|
||||
return;
|
||||
|
||||
// We do not need implementation of all events, as current statues are polled
|
||||
|
|
Loading…
Reference in New Issue