Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e284598

Browse files
authored
Ensure the destructor is called since it destroys the EGLSurface before creating a new onscreen surface. (#20916)
1 parent d368b87 commit e284598

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shell/platform/android/android_surface_gl.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ bool AndroidSurfaceGL::SetNativeWindow(
9292
FML_DCHECK(IsValid());
9393
FML_DCHECK(window);
9494
native_window_ = window;
95+
// Ensure the destructor is called since it destroys the `EGLSurface` before
96+
// creating a new onscreen surface.
97+
onscreen_surface_ = nullptr;
9598
// Create the onscreen surface.
9699
onscreen_surface_ = android_context_->CreateOnscreenSurface(window);
97100
if (!onscreen_surface_->IsValid()) {

0 commit comments

Comments
 (0)