From 93c02ed46cae18922efbd4833d825c44bade46c0 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Sat, 24 Apr 2021 18:35:31 -0700 Subject: [PATCH] Do not use android_context after it is std::moved in the PlatformViewAndroid constructor (flutter/engine#25757) --- .../flutter/shell/platform/android/platform_view_android.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/platform_view_android.cc b/engine/src/flutter/shell/platform/android/platform_view_android.cc index 9669fd5481..771420e799 100644 --- a/engine/src/flutter/shell/platform/android/platform_view_android.cc +++ b/engine/src/flutter/shell/platform/android/platform_view_android.cc @@ -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( - android_context, jni_facade_); + android_context_, jni_facade_); android_surface_ = surface_factory_->CreateSurface(); FML_CHECK(android_surface_ && android_surface_->IsValid())