mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
avoid segfault with bad, missing, or corrupted audio
This commit is contained in:
parent
3f3ea6eac7
commit
19339af706
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ SoundTrack::SoundTrack(const char* fileName)
|
|||
FILESYSTEM_loadFileToMemory(fileName, &mem, &length);
|
||||
SDL_RWops *fileIn = SDL_RWFromMem(mem, length);
|
||||
sound = Mix_LoadWAV_RW(fileIn, 1);
|
||||
FILESYSTEM_freeMemory(&mem);
|
||||
if (length) FILESYSTEM_freeMemory(&mem);
|
||||
|
||||
if (sound == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue