summaryrefslogtreecommitdiff
path: root/src/graphicsvertexes.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-27 01:17:04 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-27 01:17:24 +0300
commitd4beb6fec5eefa60a2d2f873feabaf84731bd50b (patch)
treef26320d5025dc668a4b61e41746991fcc5d4f589 /src/graphicsvertexes.cpp
parentb69e0973599907a9b1021c6859cb1d668fe9debb (diff)
downloadmanaplus-d4beb6fec5eefa60a2d2f873feabaf84731bd50b.tar.gz
manaplus-d4beb6fec5eefa60a2d2f873feabaf84731bd50b.tar.bz2
manaplus-d4beb6fec5eefa60a2d2f873feabaf84731bd50b.tar.xz
manaplus-d4beb6fec5eefa60a2d2f873feabaf84731bd50b.zip
Fix memory leak in graphicsvertexes in SDL mode.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-rw-r--r--src/graphicsvertexes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp
index 0cadfedc2..d5b374db9 100644
--- a/src/graphicsvertexes.cpp
+++ b/src/graphicsvertexes.cpp
@@ -132,6 +132,7 @@ void GraphicsVertexes::init(int x, int y, int w, int h)
mH = h;
for (int f = 0; f < 10; f ++)
{
+ delete_all(sdl[mPtr].mList);
sdl[mPtr].mList.clear();
#ifdef USE_OPENGL
ogl[mPtr].init();
@@ -156,6 +157,7 @@ void GraphicsVertexes::pushSDL(SDL_Rect r1, SDL_Rect r2)
void GraphicsVertexes::clearSDL()
{
+ delete_all(sdl[mPtr].mList);
sdl[mPtr].mList.clear();
}