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

Avoid division by zero in the fix surface compatibility routine #85138

Conversation

YuriSizov
Copy link
Contributor

Closes #84997. As identified in the issue, this only happens if the mesh resource itself is completely borked and has no vertex data. Conversion cannot happen (and doesn't make sense) in this case. We can't even re-save such a resource, because it's not valid.

So there are many errors around it, and it's fine, but the crash should be avoided, which is what this PR does.

image

@YuriSizov YuriSizov added this to the 4.2 milestone Nov 20, 2023
@YuriSizov YuriSizov requested a review from a team as a code owner November 20, 2023 15:24
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Seems like a safe approach.

@akien-mga akien-mga merged commit dfd61cd into godotengine:master Nov 20, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov deleted the rendering-borked-meshes-dont-bork-the-editor branch November 20, 2023 17:41
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.

Editor crashes in RenderingServer::fix_surface_compatibility with mesh reporting 0 vertex count
2 participants