vk/device: Provide proper NULL handling in anv_device_free
The Vulkan spec does not specify that the free function provided to CreateInstance must handle NULL properly so we do it in the wrapper. If this ever changes in the spec, we can delete the extra 2 lines.
This commit is contained in:
parent
4c8e1e5888
commit
f4748bff59
|
@ -1057,6 +1057,9 @@ void
|
|||
anv_device_free(struct anv_device * device,
|
||||
void * mem)
|
||||
{
|
||||
if (mem == NULL)
|
||||
return;
|
||||
|
||||
return device->instance->pfnFree(device->instance->pAllocUserData,
|
||||
mem);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue