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

Prevent _allocate_placeholders crash if p_version->variants is null #83780

Merged

Conversation

jsjtxietian
Copy link
Contributor

Fixes the cause of crash of #83742. cc @clayjohn

However the situation which triggerred that crash is the wrong use of varying, which I suppose it can be prevented by better varying checking or at least better documentation? Not sure whether I should put that in this pr too (Ater I figured out how to fix it tmr).

@jsjtxietian jsjtxietian requested a review from a team as a code owner October 22, 2023 14:53
@jsjtxietian jsjtxietian force-pushed the prevent-null-variant-crash branch from 18fcdf3 to 5f85a04 Compare October 22, 2023 15:20
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

This change looks good.

Indeed, our shader compiler should be detecting wrong uses of varyings and throw an error and stop compilation long before it gets to this point.

@clayjohn clayjohn added this to the 4.2 milestone Oct 23, 2023
@akien-mga akien-mga merged commit 17aa5c5 into godotengine:master Oct 23, 2023
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the prevent-null-variant-crash branch October 23, 2023 11:22
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.

5 participants