Merge pull request #8844 from Hinsbart/audioplayer-crash

Fix crash when saving AudioPlayer without stream.
This commit is contained in:
Rémi Verschelde 2017-05-20 07:34:59 +02:00 committed by GitHub
commit 67389d4db7

View File

@ -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());