Audio: Check if on tree before calling can_process()
This commit is contained in:
committed by
Rémi Verschelde
parent
5f9a510441
commit
46e07a8b01
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user