[Scummvm-git-logs] scummvm master -> 71741707e19253d89e6669152fcd6048bed210de
aquadran
noreply at scummvm.org
Sat Nov 1 22:02:17 UTC 2025
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:
71741707e1 GRIM: Fix potential resource leak in OpenGL renderer
Commit: 71741707e19253d89e6669152fcd6048bed210de
https://github.com/scummvm/scummvm/commit/71741707e19253d89e6669152fcd6048bed210de
Author: Ingo van Lil (inguin at gmx.de)
Date: 2025-11-01T23:02:12+01:00
Commit Message:
GRIM: Fix potential resource leak in OpenGL renderer
The OpenGL renderer uses mismatched conditions in the text object
handling methods: createTextObject() allocates textures and user data in
case the font is non-8-bit; destroyTextObject() frees the resources only
when running the Grim Remaster.
This might leak resources if an 8-bit font is used in a game other than
the Remaster, maybe in a fan translation. Fix it by using the same
condition in both functions.
Changed paths:
engines/grim/gfx_opengl.cpp
diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp
index c49674b1283..63bd8cfbdd2 100644
--- a/engines/grim/gfx_opengl.cpp
+++ b/engines/grim/gfx_opengl.cpp
@@ -1571,7 +1571,7 @@ void GfxOpenGL::drawTextObject(const TextObject *text) {
}
void GfxOpenGL::destroyTextObject(TextObject *text) {
- if (g_grim->getGameType() != GType_GRIM || !g_grim->isRemastered())
+ if (text->getFont()->is8Bit())
return;
TextObjectUserData *ud = (TextObjectUserData *)const_cast<void *>(text->getUserData());
More information about the Scummvm-git-logs
mailing list