Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 2601 - Mix_SetError(NULL) segfaults
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 26, 2014
1 parent 67c49b1 commit 0165044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music.c
Expand Up @@ -574,7 +574,7 @@ Mix_Music *Mix_LoadMUS(const char *file)

/* We need to know if a specific error occurs; if not, we'll set a
* generic one, so we clear the current one. */
Mix_SetError(NULL);
SDL_ClearError();
music = Mix_LoadMUSType_RW(src, type, SDL_TRUE);
if ( music == NULL && Mix_GetError()[0] == '\0' ) {
Mix_SetError("Unrecognized music format");
Expand Down

0 comments on commit 0165044

Please sign in to comment.