Fix memory leak in TextDrawerSDL (sigh, variable shadowing)

This commit is contained in:
Henrik Rydgård committed 2026-01-27 20:05:24 +01:00
1 parent e3c943de83
commit 24283d3e7f
1 file changed
+1 -1
+1 -1
View File
@@ -263,7 +263,7 @@ void TextDrawerSDL::SetOrCreateFont(const FontStyle &style) {
INFO_LOG(Log::G3D, "Loading SDL font '%s' from VFS at size %d pts", useFont.c_str(), ptSize);
size_t fileSz;
uint8_t *fileData = g_VFS.ReadFile(useFont.c_str(), &fileSz);
fileData = g_VFS.ReadFile(useFont.c_str(), &fileSz);
if (fileData) {
SDL_RWops *rw = SDL_RWFromMem(fileData, static_cast<int>(fileSz));
INFO_LOG(Log::G3D, "Opened font from RW: '%p' '%d'", fileData, (int)fileSz);