mirror of https://github.com/axmolengine/axmol.git
Prevent null point exception in preloadBackgroundMusic
This commit is contained in:
parent
3a0c2cb4fb
commit
32f8060c49
|
@ -26,7 +26,7 @@ public class Cocos2dxMusic {
|
|||
}
|
||||
|
||||
public void preloadBackgroundMusic(String path){
|
||||
if (! mCurrentPath.equals(path)){
|
||||
if ((mCurrentPath == null) || (! mCurrentPath.equals(path))){
|
||||
// preload new background music
|
||||
|
||||
// release old resource and create a new one
|
||||
|
|
Loading…
Reference in New Issue