[fuchsia] Fix shader warmup. (flutter/engine#37662)

Before, ~VulkanSurface() invokes a potentially empty std::function.
Now, checks if it is empty before invoking it.
This commit is contained in:
Josh Gargus
2022-11-16 10:35:13 -08:00
committed by GitHub
parent d2e763ddb6
commit a1255b6105

View File

@@ -184,7 +184,7 @@ VulkanSurface::~VulkanSurface() {
if (buffer_id_) {
session_->DeregisterBufferCollection(buffer_id_);
}
} else {
} else if (release_image_callback_) {
release_image_callback_();
}
wait_.Cancel();