mixer.c
changeset 583 2d713670db9b
parent 562 4129f7c1c68f
child 601 05123263dab3
child 873 d159f97ef3e7
     1.1 --- a/mixer.c	Mon Jan 30 21:41:45 2012 -0500
     1.2 +++ b/mixer.c	Sun Feb 12 17:57:17 2012 -0500
     1.3 @@ -610,13 +610,15 @@
     1.4  			break;
     1.5  		default:
     1.6  			SDL_SetError("Unrecognized sound file type");
     1.7 -			return(0);			
     1.8 +			if ( freesrc ) {
     1.9 +				SDL_RWclose(src);
    1.10 +			}
    1.11 +			loaded = NULL;
    1.12 +			break;
    1.13  	}
    1.14  	if ( !loaded ) {
    1.15 +		/* The individual loaders have closed src if needed */
    1.16  		SDL_free(chunk);
    1.17 -		if ( freesrc ) {
    1.18 -			SDL_RWclose(src);
    1.19 -		}
    1.20  		return(NULL);
    1.21  	}
    1.22