[Scummvm-git-logs] scummvm master -> 9686459bb5b18924f5d1e11a9d44a7d5341c5d4b

sev- noreply at scummvm.org
Sat Jun 13 21:19:17 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
9686459bb5 GRAPHICSL MACGUI: Plug memory leak


Commit: 9686459bb5b18924f5d1e11a9d44a7d5341c5d4b
    https://github.com/scummvm/scummvm/commit/9686459bb5b18924f5d1e11a9d44a7d5341c5d4b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-06-13T23:18:50+02:00

Commit Message:
GRAPHICSL MACGUI: Plug memory leak

Changed paths:
    graphics/macgui/macfontmanager.cpp


diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index a4a94fae3e3..2e2fde1b9e0 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -442,6 +442,10 @@ void MacFontManager::loadFonts(Common::MacResManager *fontFile) {
 
 				FontMan.assignFontToName(fontName, font);
 				macfont->setFont(font, false);
+				if (_fontRegistry.contains(fontName)) {
+					warning("MacFontManager: Overwriting font %s", fontName.c_str());
+					delete _fontRegistry.getVal(fontName);
+				}
 				_fontRegistry.setVal(fontName, macfont);
 
 				debugC(5, kDebugLevelMacGUI, " %s", fontName.c_str());




More information about the Scummvm-git-logs mailing list