Merge pull request #12523 from andyque/fix-linux-audio-engine-crash

add guard to audio engine pointer
This commit is contained in:
pandamicro 2015-06-25 11:48:23 +08:00
commit ac3f2f235b
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ SimpleAudioEngine* SimpleAudioEngine::getInstance() {
}
void SimpleAudioEngine::end() {
oAudioPlayer->close();
if(oAudioPlayer)
{
oAudioPlayer->close();
}
}
//////////////////////////////////////////////////////////////////////////