host nullchecks

This commit is contained in:
Henrik Rydgård 2023-03-25 11:06:47 +01:00
parent d0669d118d
commit 9cf7870ffa
3 changed files with 8 additions and 4 deletions

View file

@ -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:

View file

@ -1934,7 +1934,9 @@ void __KernelGPUReplay() {
PSPPointer<u8> topaddr;
u32 linesize = 512;
__DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0);
host->SendDebugScreenshot(topaddr, linesize, 272);
if (host) {
host->SendDebugScreenshot(topaddr, linesize, 272);
}
Core_Stop();
}
}

@ -1 +1 @@
Subproject commit b34f619e1c85810dcb3c578107d2e48ba4ee2b37
Subproject commit 77551c429f86c0e077f26552b7c1c0f12a9f235e