Fix crash when saving AudioPlayer without stream.
Guards against calling this setter with invalid input.
This commit is contained in:
parent
6fd217d7c3
commit
02aa1dd600
1 changed files with 1 additions and 0 deletions
|
@ -113,6 +113,7 @@ void AudioPlayer::_notification(int p_what) {
|
|||
|
||||
void AudioPlayer::set_stream(Ref<AudioStream> p_stream) {
|
||||
|
||||
ERR_FAIL_COND(!p_stream.is_valid());
|
||||
AudioServer::get_singleton()->lock();
|
||||
|
||||
mix_buffer.resize(AudioServer::get_singleton()->thread_get_mix_buffer_size());
|
||||
|
|
Loading…
Reference in a new issue