mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Common/MemArena: A zero-byte allocation is invalid.
This commit is contained in:
@ -445,6 +445,9 @@ void* LazyMemoryRegion::Create(size_t size)
|
||||
{
|
||||
ASSERT(!m_memory);
|
||||
|
||||
if (size == 0)
|
||||
return nullptr;
|
||||
|
||||
void* memory = VirtualAlloc(nullptr, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
|
||||
if (!memory)
|
||||
{
|
||||
|
Reference in New Issue
Block a user