ensure that bridge is not destroyed when semantics is still enabled (flutter/engine#5672)

This commit is contained in:
Jonah Williams
2018-07-03 22:25:40 -07:00
committed by GitHub
parent 10e5400c52
commit f5e9db755b

View File

@@ -65,7 +65,7 @@ sk_sp<GrContext> PlatformViewIOS::CreateResourceContext() const {
void PlatformViewIOS::SetSemanticsEnabled(bool enabled) {
if (enabled && !accessibility_bridge_) {
accessibility_bridge_ = std::make_unique<AccessibilityBridge>(owner_view_, this);
} else {
} else if (!enabled && accessibility_bridge_) {
accessibility_bridge_.reset();
}
PlatformView::SetSemanticsEnabled(enabled);