Commit cfb7020a authored by David Reid's avatar David Reid

Add a null check to ma_free().

parent fa2fc03e
......@@ -44818,6 +44818,10 @@ MA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllo
MA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)
{
if (p == NULL) {
return;
}
if (pAllocationCallbacks != NULL) {
if (pAllocationCallbacks->onFree != NULL) {
pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment