Skip to content

Commit

Permalink
Fix Linux crashes if no map music exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-n committed Dec 23, 2015
1 parent 54f738c commit 51ee7ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ void AudioManager::playMapMusic(std::string filename)
_mapMusicBuffer = 0;
}

if (filename == "")
{
_playingMenuMusic = false;
return;
}

_mapMusicBuffer = bufferFromOGG("./data/music/" + filename);

if (_playingMenuMusic)
Expand Down

0 comments on commit 51ee7ca

Please sign in to comment.