Merge pull request #114966 from sigmund68k/issue-112477

Audio: Check if on tree before calling `can_process()`.
This commit is contained in:
Rémi Verschelde 2026-01-19 21:45:35 +01:00
commit 122d0bfddc
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -114,7 +114,8 @@ void AudioStreamPlayerInternal::notification(int p_what) {
case Node::NOTIFICATION_SUSPENDED:
case Node::NOTIFICATION_PAUSED: {
if (!node->can_process()) {
bool can_process = node->is_inside_tree() && node->can_process();
if (!can_process) {
// Node can't process so we start fading out to silence
set_stream_paused(true);
}