diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-15 19:08:27 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-15 19:08:27 +0000 |
commit | d43e71a2423bb56d0ffe71d14093414e57e89ecb (patch) | |
tree | fc72b74a2bc13f73c6e3f83087ad778b26c884d8 /crawl-ref/source/tiletex.cc | |
parent | 5932620bfc39a9386d253378c4550cd4aca344b6 (diff) | |
download | crawl-ref-d43e71a2423bb56d0ffe71d14093414e57e89ecb.tar.gz crawl-ref-d43e71a2423bb56d0ffe71d14093414e57e89ecb.zip |
Plug a couple of memory holes. Unfortunately, between libSDL and
libfreetype there's loads of leakage that I can't do anything about.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9983 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tiletex.cc')
-rw-r--r-- | crawl-ref/source/tiletex.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc index 9f01a25456..faaf20f5b0 100644 --- a/crawl-ref/source/tiletex.cc +++ b/crawl-ref/source/tiletex.cc @@ -198,15 +198,13 @@ bool GenericTexture::load_texture(const char *filename, bool success = false; if (!proc || proc(pixels, new_width, new_height)) - { success |= load_texture(pixels, new_width, new_height, mip_opt); - } // If conversion has occurred, delete converted data. if (pixels != img->pixels) - delete pixels; + delete[] pixels; - m_orig_width = img->w; + m_orig_width = img->w; m_orig_height = img->h; SDL_FreeSurface(img); |