Fixed bug 2601 - Mix_SetError(NULL) segfaults
authorSam Lantinga <slouken@libsdl.org>
Wed, 25 Jun 2014 21:04:22 -0700
changeset 6873af92aa761d2
parent 686 dd498db4e82e
child 688 1c04e249ac3e
Fixed bug 2601 - Mix_SetError(NULL) segfaults
music.c
     1.1 --- a/music.c	Wed Jun 25 00:49:12 2014 -0700
     1.2 +++ b/music.c	Wed Jun 25 21:04:22 2014 -0700
     1.3 @@ -574,7 +574,7 @@
     1.4  
     1.5      /* We need to know if a specific error occurs; if not, we'll set a
     1.6       * generic one, so we clear the current one. */
     1.7 -    Mix_SetError(NULL);
     1.8 +    SDL_ClearError();
     1.9      music = Mix_LoadMUSType_RW(src, type, SDL_TRUE);
    1.10      if ( music == NULL && Mix_GetError()[0] == '\0' ) {
    1.11          Mix_SetError("Unrecognized music format");