diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index dba162c325..1a36d9130a 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -298,8 +298,13 @@ u32 sceDisplaySetFramebuf() if (sync == PSP_DISPLAY_SETBUF_IMMEDIATE) { // Write immediately to the current framebuffer parameters - framebuf = fbstate; - gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat); + if (topaddr != 0) + { + framebuf = fbstate; + gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat); + } + else + WARN_LOG(HLE, "%s: PSP_DISPLAY_SETBUF_IMMEDIATE without topaddr?", __FUNCTION__); } else if (topaddr != 0) { diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index c485ecc999..ce3fbe3915 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -192,7 +192,7 @@ void __IoInit() { } void __IoShutdown() { - + pspFileSystem.UnmountAll(); } u32 sceIoAssign(const char *aliasname, const char *physname, const char *devname, u32 flag) { diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 446fe4a871..113868f9eb 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -845,7 +845,7 @@ void __KernelReSchedule(bool doCallbacks, const char *reason) thread->isProcessingCallbacks = doCallbacks; } __KernelReSchedule(reason); - if (doCallbacks && thread == currentThread) { + if (doCallbacks && thread != NULL && thread == currentThread) { if (thread->isRunning()) { thread->isProcessingCallbacks = false; } @@ -1833,8 +1833,12 @@ void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, bo } if (!called) { - DEBUG_LOG(HLE, "Making mipscall pending on thread"); - thread->pendingMipsCalls.push_back(callId); + if (thread) { + DEBUG_LOG(HLE, "Making mipscall pending on thread"); + thread->pendingMipsCalls.push_back(callId); + } else { + WARN_LOG(HLE, "Ignoring mispcall on NULL/deleted thread"); + } } }