Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear only owners that are no longer in the same tree #56519

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Jan 5, 2022

The changes in #55512 were too eager to reset owners to null. This PR restores the part of the removed logic that will reset owners unless they are still reachable in the pruned branch.

As a result, by the tree exited signals some nodes still keep a reference to their owners (similarly to what happened before #55512):

exited C [Object:null]
exited B2 B:[Node2D:29276242403]
exited B [Object:null]
exited Node A:[Node2D:29242687975]
exited A [Object:null]

Fixes #56515.

@RandomShaper RandomShaper added bug topic:core topic:editor cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Jan 5, 2022
@RandomShaper RandomShaper added this to the 4.0 milestone Jan 5, 2022
@RandomShaper RandomShaper requested a review from a team as a code owner January 5, 2022 13:05
@akien-mga akien-mga merged commit bb4157a into godotengine:master Jan 5, 2022
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the fix_scene_cleared branch January 5, 2022 15:55
@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scene tree is cleared when switching tabs
2 participants