diff options
-rw-r--r-- | src/util/vk_alloc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/vk_alloc.h b/src/util/vk_alloc.h index a8e21cade11..7ae5c9dfe40 100644 --- a/src/util/vk_alloc.h +++ b/src/util/vk_alloc.h @@ -46,6 +46,9 @@ vk_realloc(const VkAllocationCallbacks *alloc, static inline void vk_free(const VkAllocationCallbacks *alloc, void *data) { + if (data == NULL) + return; + alloc->pfnFree(alloc->pUserData, data); } |