From 5da5c2931ca15c2f4e182f2fe128e92971e02a75 Mon Sep 17 00:00:00 2001 From: krcroft Date: Thu, 16 Jan 2020 14:48:43 -0800 Subject: [PATCH] Fix NULL issues in memory.cpp There is no sense in testing the 'MemBase' pointer against null, as the memory was allocated using the 'new' operator, which throws. --- src/hardware/memory.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/hardware/memory.cpp b/src/hardware/memory.cpp index 60dd5608..0b4352bf 100644 --- a/src/hardware/memory.cpp +++ b/src/hardware/memory.cpp @@ -564,9 +564,6 @@ public: LOG_MSG("Stick with the default values unless you are absolutely certain."); } MemBase = new Bit8u[memsize*1024*1024]; - if (!MemBase) E_Exit("Can't allocate main memory of %d MB",memsize); - /* Clear the memory, as new doesn't always give zeroed memory - * (Visual C debug mode). We want zeroed memory though. */ memset((void*)MemBase,0,memsize*1024*1024); memory.pages = (memsize*1024*1024)/4096; /* Allocate the data for the different page information blocks */