Fix freeze on exit on audiostreamplayers when setting invalid stream, closes #10093
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user