From 46f2afaecc9e74898cc512e57acf67eaa4037bb7 Mon Sep 17 00:00:00 2001 From: zilmar Date: Fri, 15 Jan 2016 08:11:12 +1100 Subject: [PATCH] [Project64] N64RomClass.cpp Unprotect memory on freeing it --- Source/Project64-core/N64System/N64RomClass.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Project64-core/N64System/N64RomClass.cpp b/Source/Project64-core/N64System/N64RomClass.cpp index 6ddb6c6e6..c7fe82272 100644 --- a/Source/Project64-core/N64System/N64RomClass.cpp +++ b/Source/Project64-core/N64System/N64RomClass.cpp @@ -617,10 +617,9 @@ void CN64Rom::UnallocateRomImage() { m_RomFile.Close(); - //if this value is still set then the image was not created a map - //file but created with VirtualAllocate if (m_ROMImageBase) { + ProtectMemory(m_ROMImage, m_RomFileSize, MEM_READWRITE); delete[] m_ROMImageBase; m_ROMImageBase = NULL; }