Fix double free or corruption exception (flutter/engine#39880)

Fix double free or corruption exception (GLFW_drm example)
This commit is contained in:
Hidenori Matsubayashi
2023-03-03 06:22:52 +09:00
committed by GitHub
parent 7a368e10bd
commit 5441047c8e

View File

@@ -153,7 +153,10 @@ bool RunFlutter(GLFWwindow* window,
config.open_gl.present_with_info =
[](void* userdata, const FlutterPresentInfo* info) -> bool {
// Free the existing damage that was allocated to this frame.
free(existing_damage_map_[info->fbo_id]);
if (existing_damage_map_[info->fbo_id] != nullptr) {
free(existing_damage_map_[info->fbo_id]);
existing_damage_map_[info->fbo_id] = nullptr;
}
// Get list of extensions.
const char* extensions = eglQueryString(display_, EGL_EXTENSIONS);