[Scummvm-git-logs] scummvm master -> 97129b9f9667eef23e64d4aff85bfd2ee472655b
lephilousophe
noreply at scummvm.org
Sun Feb 16 10:31:45 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
97129b9f96 3DS: Fix improper memory freeing (Sprite.vertices)
Commit: 97129b9f9667eef23e64d4aff85bfd2ee472655b
https://github.com/scummvm/scummvm/commit/97129b9f9667eef23e64d4aff85bfd2ee472655b
Author: Michael Ball (ballm4788 at gmail.com)
Date: 2025-02-16T11:31:41+01:00
Commit Message:
3DS: Fix improper memory freeing (Sprite.vertices)
Changed paths:
backends/platform/3ds/osystem-graphics.cpp
backends/platform/3ds/sprite.cpp
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 649e5d41335..3f36e9bcd28 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -113,12 +113,7 @@ void OSystem_3DS::init3DSGraphics() {
void OSystem_3DS::destroy3DSGraphics() {
_gameScreen.free();
- _gameTopTexture.free();
- _gameBottomTexture.free();
_cursor.free();
- _cursorTexture.free();
- _overlay.free();
- _activityIcon.free();
shaderProgramFree(&_program);
DVLB_Free(_dvlb);
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index ef3ac19dc64..04054ab6af6 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -45,7 +45,8 @@ Sprite::Sprite()
}
Sprite::~Sprite() {
- //
+ free();
+ linearFree(vertices);
}
void Sprite::create(uint16 width, uint16 height, const GfxMode3DS *mode, bool vram) {
@@ -84,7 +85,6 @@ void Sprite::create(uint16 width, uint16 height, const GfxMode3DS *mode, bool vr
}
void Sprite::free() {
- linearFree(vertices);
linearFree(pixels);
C3D_TexDelete(&texture);
pixels = 0;
More information about the Scummvm-git-logs
mailing list