diff options
| author | Juan Linietsky | 2017-09-01 16:42:50 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-09-01 16:43:46 -0300 |
| commit | 42659b0d9f29967a89d5055f23decacb81018509 (patch) | |
| tree | 499d320be26d3d068de079c79b188326e6884741 /scene/audio/audio_player.cpp | |
| parent | 3694c58d3cb9f2af41a8f964e00712bb5578af76 (diff) | |
| download | godot-42659b0d9f29967a89d5055f23decacb81018509.tar.gz godot-42659b0d9f29967a89d5055f23decacb81018509.tar.zst godot-42659b0d9f29967a89d5055f23decacb81018509.zip | |
Diffstat (limited to 'scene/audio/audio_player.cpp')
| -rw-r--r-- | scene/audio/audio_player.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp index 5d71f702d..8bd924e7c 100644 --- a/scene/audio/audio_player.cpp +++ b/scene/audio/audio_player.cpp @@ -139,12 +139,12 @@ void AudioStreamPlayer::set_stream(Ref<AudioStream> p_stream) { stream = p_stream; stream_playback = p_stream->instance_playback(); + AudioServer::get_singleton()->unlock(); + if (stream_playback.is_null()) { stream.unref(); ERR_FAIL_COND(stream_playback.is_null()); } - - AudioServer::get_singleton()->unlock(); } Ref<AudioStream> AudioStreamPlayer::get_stream() const { |
