From 82cdb6a12edf3a970db84a7763d52cb76ee47f5a Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 23 Jun 2008 00:50:20 +0000 Subject: [PATCH] Fixed crashing bug related to memwatch and "load last file on memwatch startup" --- src/drivers/win/memwatch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/win/memwatch.cpp b/src/drivers/win/memwatch.cpp index 56b5d9a1..e449ad36 100644 --- a/src/drivers/win/memwatch.cpp +++ b/src/drivers/win/memwatch.cpp @@ -537,6 +537,7 @@ void OpenMemwatchRecentFile(int memwRFileNumber) { int rnum=memwRFileNumber; if (rnum > MEMW_MAX_NUMBER_OF_RECENT_FILES) return; //just in case + if (rnum == NULL) return; //If no recent files exist just return. Useful for Load last file on startup (or if something goes screwy) char* x = memw_recent_files[rnum]; char watchfcontents[2048];