mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
avoid segfault with bad, missing, or corrupted audio
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user