Seek back to start on error
authorSam Lantinga <slouken@libsdl.org>
Sat, 04 Feb 2006 22:01:44 +0000
changeset 1329bc67bbf87818
parent 1328 27ddb06a0bca
child 1330 450721ad5436
Seek back to start on error
src/video/SDL_bmp.c
     1.1 --- a/src/video/SDL_bmp.c	Sat Feb 04 16:29:22 2006 +0000
     1.2 +++ b/src/video/SDL_bmp.c	Sat Feb 04 22:01:44 2006 +0000
     1.3 @@ -318,6 +318,9 @@
     1.4  	}
     1.5  done:
     1.6  	if ( was_error ) {
     1.7 +		if ( src ) {
     1.8 +			SDL_RWseek(src, fp_offset, SEEK_SET);
     1.9 +		}
    1.10  		if ( surface ) {
    1.11  			SDL_FreeSurface(surface);
    1.12  		}