diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 0ae08ced89..3a10d031cf 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -54,13 +54,13 @@ void* AllocateExecutableMemory(size_t size, bool low) // printf("Mapped executable memory at %p (size %ld)\n", ptr, // (unsigned long)size); -#if defined(__FreeBSD__) +#ifdef _WIN32 + if (ptr == nullptr) + { +#else if (ptr == MAP_FAILED) { ptr = nullptr; -#else - if (ptr == nullptr) - { #endif PanicAlert("Failed to allocate executable memory"); }