Skip to content

Commit

Permalink
Correctly handle failure to load stream in Allegro acodec codec handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
NewCreature committed Jul 20, 2018
1 parent ce24275 commit 09b1d93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/codec_handlers/allegro_acodec/allegro_acodec.c
Expand Up @@ -49,6 +49,11 @@ static void * codec_load_file(const char * fn, const char * subfn)
strcpy(data->player_filename, fn);
data->volume = 1.0;
}
else
{
free(data);
data = NULL;
}
}
return data;
}
Expand Down

0 comments on commit 09b1d93

Please sign in to comment.