From 1b1a8cef02c784ecef28ad6a274cc74cc3bd8294 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 5 Oct 2013 10:16:25 -0700 Subject: [PATCH] Fix a potential null pointer. --- Core/HLE/sceKernelMsgPipe.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index 30eee3ab98..10caba282e 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -610,6 +610,12 @@ void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) SceUID uid = __KernelGetWaitID(threadID, WAITTYPE_MSGPIPE, error); MsgPipe *ko = uid == 0 ? NULL : kernelObjects.Get(uid, error); + if (ko == NULL) + { + ERROR_LOG_REPORT(SCEKERNEL, "__KernelMsgPipeEndCallback: Invalid object"); + return; + } + switch (waitValue) { case MSGPIPE_WAIT_VALUE_SEND: