Skip to content

Commit

Permalink
Seek back to start on error
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 4, 2006
1 parent b967640 commit da7ad9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/SDL_bmp.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit da7ad9a

Please sign in to comment.