Skip to content

Commit 94dc7dd

Browse files
[Impeller] Null check for the device holder in the Vulkan context destructor (flutter#42821)
1 parent 815db98 commit 94dc7dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

impeller/renderer/backend/vulkan/context_vk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ uint64_t CalculateHash(void* ptr) {
107107
ContextVK::ContextVK() : hash_(CalculateHash(this)) {}
108108

109109
ContextVK::~ContextVK() {
110-
if (device_holder_->device) {
110+
if (device_holder_ && device_holder_->device) {
111111
[[maybe_unused]] auto result = device_holder_->device->waitIdle();
112112
}
113113
CommandPoolVK::ClearAllPools(this);

0 commit comments

Comments
 (0)