Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5216 in orxonox.OLD for trunk/src/lib/graphics/graphics_engine.cc


Ignore:
Timestamp:
Sep 22, 2005, 4:44:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more fixes due to valgrind

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r5124 r5216  
    168168void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
    169169{
    170   SDL_WM_SetIcon(SDL_LoadBMP(icon), NULL);
    171 
     170  SDL_Surface* iconSurf = SDL_LoadBMP(icon);
     171
     172  SDL_WM_SetIcon(iconSurf, NULL);
    172173  SDL_WM_SetCaption (windowName, icon);
     174
     175  delete iconSurf;
    173176}
    174177
     
    211214    {
    212215      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
    213       SDL_Quit();
     216      //    SDL_Quit();
    214217      //    return -1;
    215218    }
Note: See TracChangeset for help on using the changeset viewer.