Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only call destruction_callback if non-null (flutter#24845)
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 flutter/flutter#76881. While this prevents the crash, it does not fix the underlying issue.
- Loading branch information