Skip to content
Permalink
Browse files

sceFontLib: Don't call the callback if double-free. Should fix one pa…

…rt of #6627
  • Loading branch information...
hrydgard committed Mar 11, 2019
1 parent 335d257 commit 7865589f4810e6a55d632a4d97a6e20510e6194b
Showing with 3 additions and 1 deletion.
  1. +3 −1 Core/HLE/sceFont.cpp
@@ -436,7 +436,9 @@ class FontLib {
}
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();

0 comments on commit 7865589

Please sign in to comment.
You can’t perform that action at this time.