Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #705 from Sonicadvance1/fix-memoryutil-check
Fixes a check for what mmap returns.
  • Loading branch information
lioncash committed Jul 31, 2014
2 parents 5bb9a74 + 33450c8 commit c5188c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Common/MemoryUtil.cpp
Expand Up @@ -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");
}
Expand Down

0 comments on commit c5188c7

Please sign in to comment.