diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index b007b40d216..7751ce8653b 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -325,6 +325,9 @@ void anv_DestroyInstance( { ANV_FROM_HANDLE(anv_instance, instance, _instance); + if (!instance) + return; + if (instance->physicalDeviceCount > 0) { /* We support at most one physical device. */ assert(instance->physicalDeviceCount == 1); @@ -978,6 +981,9 @@ void anv_DestroyDevice( { ANV_FROM_HANDLE(anv_device, device, _device); + if (!device) + return; + anv_device_finish_blorp(device); anv_queue_finish(&device->queue);