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:
Jason Ekstrand 2015-07-15 15:15:54 -07:00
parent 4c8e1e5888
commit f4748bff59
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}