diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-19 22:27:13 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-19 22:27:13 -0600 |
commit | a7bddc674892b81de9471a7b8ee8da19ed8e1e90 (patch) | |
tree | 865b6835c53ad38802d3723182292af27c0f412a /src | |
parent | 61f4e3b9838ac7a0e06cd066ea07224670f1b851 (diff) | |
download | mana-client-a7bddc674892b81de9471a7b8ee8da19ed8e1e90.tar.gz mana-client-a7bddc674892b81de9471a7b8ee8da19ed8e1e90.tar.bz2 mana-client-a7bddc674892b81de9471a7b8ee8da19ed8e1e90.tar.xz mana-client-a7bddc674892b81de9471a7b8ee8da19ed8e1e90.zip |
Be sure to free the window icon
Diffstat (limited to 'src')
-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 dddf53d0..82f0ad20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -147,6 +147,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. @@ -394,7 +396,7 @@ void init_engine(const Options &options) SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); } #else - SDL_Surface *icon = IMG_Load(PKG_DATADIR "data/icons/tmw.png"); + icon = IMG_Load(PKG_DATADIR "data/icons/tmw.png"); if (icon) { SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); @@ -493,6 +495,8 @@ void exit_engine() ResourceManager::deleteInstance(); delete logger; + + SDL_FreeSurface(icon); } void printHelp() |