From 72921e0a3c4cde3fdf86e312968f8d184b8f60ed Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 31 Mar 2013 12:09:59 -0700 Subject: [PATCH] If the mipscall id doesn't match, don't create. Fixes a crash when savestating. --- Core/HLE/sceKernelThread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 16f1256294..c09fe8aa3a 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -163,7 +163,10 @@ public: return id; } MipsCall *get(u32 id) { - return calls_[id]; + auto iter = calls_.find(id); + if (iter == calls_.end()) + return NULL; + return iter->second; } MipsCall *pop(u32 id) { MipsCall *temp = calls_[id];