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

Fix crash when deleting the player in AnimationPlayerEditorPlugin #82573

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Sep 30, 2023

Fix #82549

The player is just a weak pointer, which doesn't allocate and shouldn't free in this class:

player = Object::cast_to<AnimationPlayer>(p_object);

@Chaosus Chaosus changed the title Fix crash when deleting the same player in AnimationPlayerEditorPlugin Fix crash when deleting the player in AnimationPlayerEditorPlugin Sep 30, 2023
@fire fire requested review from TokageItLab and a team October 1, 2023 16:59
Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not been able to test this because I am exactly away from home, but I don't think this fix will be a major problem since it is a destructor behavior change. In any case, crashes should be avoided and should be fixed later if this causes regressions.

It would be helpful if someone could test just to see if the dummy player pointer is broken or not when using AnimationTree.

@akien-mga akien-mga merged commit 1d6f37f into godotengine:master Oct 2, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Chaosus Chaosus deleted the fix_animationtree_crash branch October 2, 2023 12:48
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.

Crash when closing the editor with an empty AnimationTree
3 participants