diff --git a/engine/src/flutter/shell/platform/windows/flutter_windows_winuwp.cc b/engine/src/flutter/shell/platform/windows/flutter_windows_winuwp.cc index e3385879bf..942d4b1ec7 100644 --- a/engine/src/flutter/shell/platform/windows/flutter_windows_winuwp.cc +++ b/engine/src/flutter/shell/platform/windows/flutter_windows_winuwp.cc @@ -35,11 +35,10 @@ FlutterDesktopViewControllerCreateFromCoreWindow( auto state = std::make_unique(); state->view = std::make_unique(std::move(window_wrapper)); - state->view->CreateRenderSurface(); - // Take ownership of the engine, starting it if necessary. state->view->SetEngine( std::unique_ptr(EngineFromHandle(engine))); + state->view->CreateRenderSurface(); if (!state->view->GetEngine()->running()) { if (!state->view->GetEngine()->RunWithEntrypoint(nullptr)) { return nullptr;