From d4f6b49dc452d26ff8ea4d47a7e2f24aeb309476 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 19 Jan 2015 08:34:12 -0800 Subject: [PATCH] Handle an error condition better. Just in case someone typos a MIPS_MAKE_SYSCALL(). --- Core/HLE/HLE.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index f00abf1e15..8c4e973868 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -131,6 +131,9 @@ int GetFuncIndex(int moduleIndex, u32 nib) u32 GetNibByName(const char *moduleName, const char *function) { int moduleIndex = GetModuleIndex(moduleName); + if (moduleIndex == -1) + return -1; + const HLEModule &module = moduleDB[moduleIndex]; for (int i = 0; i < module.numFunctions; i++) {