diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-19 22:27:13 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-19 23:09:54 -0600 |
commit | 347452b9b69ef3af29c577b7751082822e900c01 (patch) | |
tree | 090fa7f07f6be66c7397c284ff4537c798a8cd30 | |
parent | 4b7755fcae0de15951c508ec034158007c8b6cf3 (diff) | |
download | mana-client-347452b9b69ef3af29c577b7751082822e900c01.tar.gz mana-client-347452b9b69ef3af29c577b7751082822e900c01.tar.bz2 mana-client-347452b9b69ef3af29c577b7751082822e900c01.tar.xz mana-client-347452b9b69ef3af29c577b7751082822e900c01.zip |
Be sure to free the window icon
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index a04c8696..2ecde05d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -145,6 +145,8 @@ std::string updatesDir; LoginHandler loginHandler; MapLoginHandler mapLoginHandler; +SDL_Surface *icon; + /** * A structure holding the values of various options that can be passed from * the command line. @@ -387,7 +389,7 @@ void init_engine(const Options &options) SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); } #else - SDL_Surface *icon = IMG_Load(PKG_DATADIR "data/icons/aethyra.png"); + icon = IMG_Load(PKG_DATADIR "data/icons/aethyra.png"); if (icon) { SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); @@ -487,6 +489,8 @@ void exit_engine() ResourceManager::deleteInstance(); delete logger; + + SDL_FreeSurface(icon); } void printHelp() |