Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions loader/allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@

void *loader_calloc(const VkAllocationCallbacks *pAllocator, size_t size, VkSystemAllocationScope allocation_scope) {
void *pMemory = NULL;

// Requesting a size 0 allocation to either calloc or custom Vulkan allocators is unspecified. This means we could get NULL as
// the return value, which can end up as an OOM error from the loader when execution can continue without issues.
if (size == 0) size = 1;

#if (DEBUG_DISABLE_APP_ALLOCATORS == 1)
{
#else
Expand Down
Loading