Do not use android_context after it is std::moved in the PlatformViewAndroid constructor (flutter/engine#25757)

This commit is contained in:
Jason Simmons
2021-04-24 18:35:31 -07:00
committed by GitHub
parent ad7feafd75
commit 93c02ed46c

View File

@@ -94,11 +94,11 @@ PlatformViewAndroid::PlatformViewAndroid(
platform_view_android_delegate_(jni_facade) {
// TODO(dnfield): always create a pbuffer surface for background use to
// resolve https://github.com/flutter/flutter/issues/73675
if (android_context) {
FML_CHECK(android_context->IsValid())
if (android_context_) {
FML_CHECK(android_context_->IsValid())
<< "Could not create surface from invalid Android context.";
surface_factory_ = std::make_shared<AndroidSurfaceFactoryImpl>(
android_context, jni_facade_);
android_context_, jni_facade_);
android_surface_ = surface_factory_->CreateSurface();
FML_CHECK(android_surface_ && android_surface_->IsValid())