Add missing null check before disconnecting source
This commit is contained in:
parent
3e0c10d393
commit
1776258b1c
@ -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
Block a user