From f5e9db755b238921d132ad62c65493bde61b5742 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 3 Jul 2018 22:25:40 -0700 Subject: [PATCH] ensure that bridge is not destroyed when semantics is still enabled (flutter/engine#5672) --- .../src/flutter/shell/platform/darwin/ios/platform_view_ios.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm b/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm index 1fba8e5e02..7d64bb80cb 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm @@ -65,7 +65,7 @@ sk_sp PlatformViewIOS::CreateResourceContext() const { void PlatformViewIOS::SetSemanticsEnabled(bool enabled) { if (enabled && !accessibility_bridge_) { accessibility_bridge_ = std::make_unique(owner_view_, this); - } else { + } else if (!enabled && accessibility_bridge_) { accessibility_bridge_.reset(); } PlatformView::SetSemanticsEnabled(enabled);