src/video/SDL_video.c
changeset 7720 f9a649383362
parent 7719 31b5f9ff36ca
child 7721 bdf8c2c84e14
equal deleted inserted replaced
7719:31b5f9ff36ca 7720:f9a649383362
  1430 
  1430 
  1431     if (!icon) {
  1431     if (!icon) {
  1432         return;
  1432         return;
  1433     }
  1433     }
  1434 
  1434 
  1435     if (window->icon) {
  1435     SDL_FreeSurface(window->icon);
  1436         SDL_FreeSurface(window->icon);
       
  1437     }
       
  1438 
  1436 
  1439     /* Convert the icon into ARGB8888 */
  1437     /* Convert the icon into ARGB8888 */
  1440     window->icon = SDL_ConvertSurfaceFormat(icon, SDL_PIXELFORMAT_ARGB8888, 0);
  1438     window->icon = SDL_ConvertSurfaceFormat(icon, SDL_PIXELFORMAT_ARGB8888, 0);
  1441     if (!window->icon) {
  1439     if (!window->icon) {
  1442         return;
  1440         return;
  2181     /* Now invalidate magic */
  2179     /* Now invalidate magic */
  2182     window->magic = NULL;
  2180     window->magic = NULL;
  2183 
  2181 
  2184     /* Free memory associated with the window */
  2182     /* Free memory associated with the window */
  2185     SDL_free(window->title);
  2183     SDL_free(window->title);
  2186     if (window->icon) {
  2184     SDL_FreeSurface(window->icon);
  2187         SDL_FreeSurface(window->icon);
       
  2188     }
       
  2189     SDL_free(window->gamma);
  2185     SDL_free(window->gamma);
  2190     while (window->data) {
  2186     while (window->data) {
  2191         SDL_WindowUserData *data = window->data;
  2187         SDL_WindowUserData *data = window->data;
  2192 
  2188 
  2193         window->data = data->next;
  2189         window->data = data->next;