diff options
-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() |