mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 16:55:29 -05:00
Seek back to start on error
This commit is contained in:
@@ -318,6 +318,9 @@ SDL_Surface * SDL_LoadBMP_RW (SDL_RWops *src, int freesrc)
|
||||
}
|
||||
done:
|
||||
if ( was_error ) {
|
||||
if ( src ) {
|
||||
SDL_RWseek(src, fp_offset, SEEK_SET);
|
||||
}
|
||||
if ( surface ) {
|
||||
SDL_FreeSurface(surface);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user