diff --git a/src/dawn/native/metal/DeviceMTL.mm b/src/dawn/native/metal/DeviceMTL.mm index e5e592b6c2..4c8918472e 100644 --- a/src/dawn/native/metal/DeviceMTL.mm +++ b/src/dawn/native/metal/DeviceMTL.mm @@ -464,7 +464,9 @@ MaybeError Device::CopyFromStagingToTexture(const StagingBufferBase* source, Ref Device::CreateTextureWrappingIOSurface(const ExternalImageDescriptor* descriptor, IOSurfaceRef ioSurface) { const TextureDescriptor* textureDescriptor = FromAPI(descriptor->cTextureDescriptor); - + if (ConsumedError(ValidateIsAlive())) { + return nullptr; + } if (ConsumedError(ValidateTextureDescriptor(this, textureDescriptor))) { return nullptr; } diff --git a/src/dawn/native/vulkan/DeviceVk.cpp b/src/dawn/native/vulkan/DeviceVk.cpp index 5d6ba5a0a3..fec7cb51ad 100644 --- a/src/dawn/native/vulkan/DeviceVk.cpp +++ b/src/dawn/native/vulkan/DeviceVk.cpp @@ -904,6 +904,9 @@ TextureBase* Device::CreateTextureWrappingVulkanImage( const TextureDescriptor* textureDescriptor = FromAPI(descriptor->cTextureDescriptor); // Initial validation + if (ConsumedError(ValidateIsAlive())) { + return nullptr; + } if (ConsumedError(ValidateTextureDescriptor(this, textureDescriptor))) { return nullptr; }