Skip to content

Improve thrown error message when attempting to draw a destroyed FlxGraphic #3417

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

Conversation

VioletSnowLeopard
Copy link
Contributor

The error message that is thrown when attempting to draw a destroyed graphic currently is vague. It doesn't say what it tried to access, but was destroyed:

Screenshot 2025-04-13 075124

It is harder to troubleshoot the issue if you don't know which graphic is getting destroyed when its not supposed to. Thanks to this PR, the key of a FlxGraphic isn't set to null when the graphic is destroyed. This means that it can be used in the thrown error message:

Screenshot 2025-04-12 230131

This aids in the process of figuring out which graphic was destroyed so you can start working on finding where it got destroyed.

@Geokureli Geokureli added this to the 6.1.1 milestone Apr 28, 2025
@Geokureli Geokureli merged commit e356bd2 into HaxeFlixel:dev Apr 29, 2025
20 of 21 checks passed
@Geokureli
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants