mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
SaveState: Prevent edge case on old save state.
If we load an old save state and it errors, could crash.
This commit is contained in:
parent
20dd7db351
commit
e6b42f3921
1 changed files with 4 additions and 1 deletions
|
@ -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_];
|
||||
|
|
Loading…
Add table
Reference in a new issue