Merge pull request #705 from Sonicadvance1/fix-memoryutil-check

Fixes a check for what mmap returns.
This commit is contained in:
Lioncash 2014-07-31 03:06:00 -04:00
commit c5188c76b3
1 changed files with 4 additions and 4 deletions

View File

@ -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");
}