Merge pull request #94958 from adamscott/fix-missing-web-nullcheck-source
Add missing null check before disconnecting source
This commit is contained in:
commit
8d9a394f63
|
@ -630,7 +630,9 @@ class SampleNode {
|
|||
* @returns {void}
|
||||
*/
|
||||
_restart() {
|
||||
this._source.disconnect();
|
||||
if (this._source != null) {
|
||||
this._source.disconnect();
|
||||
}
|
||||
this._source = GodotAudio.ctx.createBufferSource();
|
||||
this._source.buffer = this.getSample().getAudioBuffer();
|
||||
|
||||
|
|
Loading…
Reference in New Issue