mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12523 from andyque/fix-linux-audio-engine-crash
add guard to audio engine pointer
This commit is contained in:
commit
ac3f2f235b
|
@ -46,7 +46,10 @@ SimpleAudioEngine* SimpleAudioEngine::getInstance() {
|
|||
}
|
||||
|
||||
void SimpleAudioEngine::end() {
|
||||
oAudioPlayer->close();
|
||||
if(oAudioPlayer)
|
||||
{
|
||||
oAudioPlayer->close();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue