Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audio: Prevent null source error in Audio.disconnect() (mrdoob#26597)
**Problem** Audio.disconnect() expects Audio.source is non-null and calls Audio.source.disconnect(). But Audio.source is initialized as null in the constructor and later it is set in .play() or set*() methods. So if Audio.disconnect() is called before starting to play or setting source, it can cause an error when attemping to call Audio.source.disconnect() **Solution** Add a guard in Audio.disconnect()
- Loading branch information