mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add missing null check before disconnecting source
This commit is contained in:
parent
3e0c10d393
commit
1776258b1c
1 changed files with 3 additions and 1 deletions
|
@ -630,7 +630,9 @@ class SampleNode {
|
|||
* @returns {void}
|
||||
*/
|
||||
_restart() {
|
||||
if (this._source != null) {
|
||||
this._source.disconnect();
|
||||
}
|
||||
this._source = GodotAudio.ctx.createBufferSource();
|
||||
this._source.buffer = this.getSample().getAudioBuffer();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue