add guard to audio engine pointer

This commit is contained in:
andyque 2015-06-25 10:17:31 +08:00
parent 6638a53d69
commit 2bb7b96839
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();
}
}
//////////////////////////////////////////////////////////////////////////