From 893d26b67907c311cd50fd57547d40a480f7024a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 6 Jul 2020 21:21:54 +0200 Subject: [PATCH] Add some paranoid checks in AfterMatchingMipsCall::run(). Might work around a crash in #13057 --- Core/HLE/proAdhoc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index e5e7d278fb..17e675e175 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -912,7 +912,9 @@ bool IsMatchingInCallback(SceNetAdhocMatchingContext * context) { } void AfterMatchingMipsCall::run(MipsCall &call) { - if (context == NULL) return; + if (!context || !context->eventlock) + return; + DEBUG_LOG(SCENET, "Entering AfterMatchingMipsCall::run [ID=%i][Event=%d] [cbId: %u]", context->id, EventID, call.cbId); //u32 v0 = currentMIPS->r[MIPS_REG_V0]; if (__IsInInterrupt()) ERROR_LOG(SCENET, "AfterMatchingMipsCall::run [ID=%i][Event=%d] is Returning Inside an Interrupt!", context->id, EventID);