mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-25 18:24:59 +01:00
Pass 1 to Mix_LoadMUS_RW() in MusicTrack::MusicTrack()
This makes the freesrc argument of Mix_LoadMUS_RW() 1 instead of 0. If the argument is nonzero, then the passed SDL_RWops will be automatically freed when m_music is freed, too. I don't know why this was 0 before. Setting it to 1 fixes a memory leak that Valgrind reports (which turns into an actual leak every time custom assets are mounted or unmounted).
This commit is contained in:
parent
8052f61cef
commit
16fef54ae1
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ MusicTrack::MusicTrack(const char* fileName)
|
||||||
|
|
||||||
MusicTrack::MusicTrack(SDL_RWops *rw)
|
MusicTrack::MusicTrack(SDL_RWops *rw)
|
||||||
{
|
{
|
||||||
m_music = Mix_LoadMUS_RW(rw, 0);
|
m_music = Mix_LoadMUS_RW(rw, 1);
|
||||||
m_isValid = true;
|
m_isValid = true;
|
||||||
if(m_music == NULL)
|
if(m_music == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue