diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-10 04:50:58 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-10 04:50:58 -0400 |
| commit | be3428cf8e7698e4efe9c50cd6499516e7f36332 (patch) | |
| tree | 7bfb887e78f80d667f63579f1a480a916b89b3a0 /Source/Core/Common/MemoryUtil.cpp | |
| parent | 2ff44b5a66d81643f48aea7a7781ae9f8ac9c6d4 (diff) | |
Core: Fix case where a panic alert wouldn't be shown in MemoryUtil.cpp
Diffstat (limited to 'Source/Core/Common/MemoryUtil.cpp')
| -rw-r--r-- | Source/Core/Common/MemoryUtil.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 3a10d031cf..7a075692ce 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -91,10 +91,10 @@ void* AllocateMemoryPages(size_t size) #else void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); -#endif - // printf("Mapped memory at %p (size %ld)\n", ptr, - // (unsigned long)size); + if (ptr == MAP_FAILED) + ptr = nullptr; +#endif if (ptr == nullptr) PanicAlert("Failed to allocate raw memory"); |
