diff --git a/Core/HLE/sceFont.cpp b/Core/HLE/sceFont.cpp index 1e1300858d..0bb70b5bfb 100644 --- a/Core/HLE/sceFont.cpp +++ b/Core/HLE/sceFont.cpp @@ -361,6 +361,8 @@ public: p.Do(fontLibID_); if (s >= 2) { p.Do(errorCodePtr_); + } else { + errorCodePtr_ = 0; } } void run(MipsCall &call) override; @@ -721,7 +723,8 @@ void PostAllocCallback::run(MipsCall &call) { u32 v0 = currentMIPS->r[MIPS_REG_V0]; if (v0 == 0) { // TODO: Who deletes fontLib? - Memory::Write_U32(ERROR_FONT_OUT_OF_MEMORY, errorCodePtr_); + if (errorCodePtr_) + Memory::Write_U32(ERROR_FONT_OUT_OF_MEMORY, errorCodePtr_); call.setReturnValue(0); } else { FontLib *fontLib = fontLibList[fontLibID_];