mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Add a null check to ma_free().
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user