You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add missing null check before disconnecting source
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user