Merge pull request #114966 from sigmund68k/issue-112477
Audio: Check if on tree before calling `can_process()`.
This commit is contained in:
commit
122d0bfddc
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue