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

SDFGI: Fix crash if update_data is nullptr #94535

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Garteal
Copy link
Contributor

@Garteal Garteal commented Jul 19, 2024

Fixes #94534

@Garteal Garteal requested a review from a team as a code owner July 19, 2024 12:24
@AThousandShips AThousandShips added this to the 4.3 milestone Jul 19, 2024
@akien-mga akien-mga changed the title SDFGI: fix crash if update_data is nullptr SDFGI: Fix crash if update_data is nullptr Jul 19, 2024
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.

Great work tracking this down.

It seems that sdfgi_update_data is often nullptr when drawing with canvas background enabled. In those cases, we can't use SDFGI anyway, so as much of the work from SDFGI should be skipped as possible

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.

Looks great! Thank you for your quick response and for catching this one

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected.

@akien-mga akien-mga merged commit cd74d77 into godotengine:master Jul 20, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@Garteal Garteal deleted the sdfgi-data-nullptr branch July 22, 2024 23:16
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 transitioning between scenes with SDFGI enabled and disabled respectively
5 participants