From 9cf7870ffa0116df0c4d4bdd44ce3069b32dd9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 25 Mar 2023 11:06:47 +0100 Subject: [PATCH] host nullchecks --- Core/HLE/sceIo.cpp | 6 ++++-- Core/HLE/sceKernelModule.cpp | 4 +++- ext/glslang | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index ade4158218..e02f9e1620 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -2012,7 +2012,7 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o case EMULATOR_DEVCTL__SEND_OUTPUT: { std::string data(Memory::GetCharPointer(argAddr), argLen); - if (PSP_CoreParameter().printfEmuLog) { + if (PSP_CoreParameter().printfEmuLog && host) { host->SendDebugOutput(data); } else { if (PSP_CoreParameter().collectEmuLog) { @@ -2040,7 +2040,9 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o __DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0); // TODO: Convert based on pixel format / mode / something? - host->SendDebugScreenshot(topaddr, linesize, 272); + if (host) { + host->SendDebugScreenshot(topaddr, linesize, 272); + } return 0; } case EMULATOR_DEVCTL__TOGGLE_FASTFORWARD: diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 7ea2fbf0ab..4d2d5a61ba 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1934,7 +1934,9 @@ void __KernelGPUReplay() { PSPPointer topaddr; u32 linesize = 512; __DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0); - host->SendDebugScreenshot(topaddr, linesize, 272); + if (host) { + host->SendDebugScreenshot(topaddr, linesize, 272); + } Core_Stop(); } } diff --git a/ext/glslang b/ext/glslang index b34f619e1c..77551c429f 160000 --- a/ext/glslang +++ b/ext/glslang @@ -1 +1 @@ -Subproject commit b34f619e1c85810dcb3c578107d2e48ba4ee2b37 +Subproject commit 77551c429f86c0e077f26552b7c1c0f12a9f235e