[Impeller] Null check for the device holder in the Vulkan context destructor (flutter/engine#42821)

This commit is contained in:
Jason Simmons
2023-06-13 14:03:12 -07:00
committed by GitHub
parent 75da76c7cd
commit 2a730bfe52

View File

@@ -107,7 +107,7 @@ uint64_t CalculateHash(void* ptr) {
ContextVK::ContextVK() : hash_(CalculateHash(this)) {}
ContextVK::~ContextVK() {
if (device_holder_->device) {
if (device_holder_ && device_holder_->device) {
[[maybe_unused]] auto result = device_holder_->device->waitIdle();
}
CommandPoolVK::ClearAllPools(this);