diff --git a/source/utility.cpp b/source/utility.cpp index 0ecf778d..80fec504 100644 --- a/source/utility.cpp +++ b/source/utility.cpp @@ -224,6 +224,8 @@ void util::free_aligned(void* mem) #elif defined(USE_STD_ALLOC_FREE) free(mem); #else + if (mem == nullptr) + return; void* ptr = reinterpret_cast(*reinterpret_cast(static_cast(mem) - sizeof(void*))); free(ptr); #endif