sceFontLib: Don't call the callback if double-free. Should fix one part of #6627

This commit is contained in:
Henrik Rydgård 2019-03-11 12:55:09 +01:00
parent 335d2573e7
commit 7865589f48

View File

@ -436,7 +436,9 @@ public:
}
u32 args[2] = { params_.userDataAddr, (u32)handle_ };
// TODO: The return value of this is leaking.
__KernelDirectMipsCall(params_.freeFuncAddr, 0, args, 2, false);
if (handle_) { // Avoid calling free-callback on double-free
__KernelDirectMipsCall(params_.freeFuncAddr, 0, args, 2, false);
}
handle_ = 0;
fonts_.clear();
isfontopen_.clear();