Browse Source

Close SDL_RWops in LoadPNG()

pull/3407/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
5e49d08ba5
  1. 4
      Source/utils/png.h

4
Source/utils/png.h

@ -44,7 +44,9 @@ inline void QuitPNG()
inline SDL_Surface *LoadPNG(const char *file)
{
SDL_RWops *rwops = SFileOpenRw(file);
return IMG_LoadPNG_RW(rwops);
SDL_Surface *surface = IMG_LoadPNG_RW(rwops);
SDL_RWclose(rwops);
return surface;
}
} // namespace devilution

Loading…
Cancel
Save