mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
In MakeSkSurfaceFromBackingStore and other places in embedder.cc, we call a texture or framebuffer destruction callback without first verifying it's non-null. This adds a check before such calls. Currently fl_renderer_gl_create_backing_store() in the Linux GTK embedder and ExternalTextureGL::PopulateTexture() in the Windows embedder either explicitly or implicitly set a null destruction callback. This prevents a crash reported when running under OpenGL ES 2.0 reported in https://github.com/flutter/flutter/issues/76881. While this prevents the crash, it does not fix the underlying issue.