summaryrefslogtreecommitdiff
path: root/Source/Core/Common/MemoryUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/MemoryUtil.cpp')
-rw-r--r--Source/Core/Common/MemoryUtil.cpp8
1 files changed, 4 insertions, 4 deletions
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__)
- if (ptr == MAP_FAILED)
+#ifdef _WIN32
+ if (ptr == nullptr)
{
- ptr = nullptr;
#else
- if (ptr == nullptr)
+ if (ptr == MAP_FAILED)
{
+ ptr = nullptr;
#endif
PanicAlert("Failed to allocate executable memory");
}