mirror of
https://github.com/godotengine/godot
synced 2024-11-02 10:25:48 +00:00
c088a2dd89
This crash occurred when an audio stream finished playing in NOTIFICATION_INTERNAL_PROCESS, during which it would iterate through a loop of playbacks, leading to a "finished" signal, which removed the audio player from the tree which led to a NOTIFICATION_EXIT_TREE, which would mutate the array of playbacks while within the above loop. This moves the signal callback outside of the loop which avoids the crash. Note: previously, the signal was called multiple times if the same player finishes multiple times in one frame. Now it is at most once per frame. Affects AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D |
||
---|---|---|
.. | ||
audio_stream_player.cpp | ||
audio_stream_player.h | ||
SCsub |