From 839be8e63642361cd688d4b6abf3925e6777c8a1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 6 Feb 2021 14:23:35 -0800 Subject: [PATCH] PPGe: Clear text allocations on shutdown. --- Core/Util/PPGeDraw.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index b0734e68cd..bcb0412f87 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -125,7 +125,7 @@ struct PPGeTextDrawerImage { TextStringEntry entry; u32 ptr; }; -std::map textDrawerImages; +static std::map textDrawerImages; void PPGeSetDrawContext(Draw::DrawContext *draw) { g_draw = draw; @@ -364,6 +364,10 @@ void __PPGeShutdown() delete textDrawer; textDrawer = nullptr; + + for (auto im : textDrawerImages) + kernelMemory.Free(im.second.ptr); + textDrawerImages.clear(); } void PPGeBegin()