X Tutup
Skip to content

Avoid reading from sky pointer when rendering background without sky#115874

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
clayjohn:sky-crash
Feb 5, 2026
Merged

Avoid reading from sky pointer when rendering background without sky#115874
Repiteo merged 1 commit intogodotengine:masterfrom
clayjohn:sky-crash

Conversation

@clayjohn
Copy link
Member

@clayjohn clayjohn commented Feb 4, 2026

Fixes: #115861

Regression from #115606

The sky render function can be called with a dummy sky material in a few cases, so we need to check for the existence of the sky.

For people who want to test this, the repro steps in #115861 aren't enough to cause the crash. You need to enable "fog" in the Environment and you need the background mode to be set to clear color.

Flagging for cherrypicking so we can add #115606 to 4.6.1

@clayjohn clayjohn added this to the 4.7 milestone Feb 4, 2026
@clayjohn clayjohn requested a review from a team as a code owner February 4, 2026 17:50
@clayjohn clayjohn added the cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release label Feb 4, 2026
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. Code looks good to me.

I can confirm the crash no longer occurs when following the steps that led to the crash in #115861 (comment).

@Repiteo Repiteo merged commit 7e91c61 into godotengine:master Feb 5, 2026
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 5, 2026

Thanks!

@Repiteo
Copy link
Contributor

Repiteo commented Feb 5, 2026

Cherry-picked for 4.6.1.

@Repiteo Repiteo removed the cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release label Feb 5, 2026
rivie13 pushed a commit to rivie13/Phoenix-Agentic-Engine that referenced this pull request Feb 16, 2026
Avoid reading from sky pointer when rendering background without sky
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.

Adding or using world enviroment ( without using sky ) node crash godot.

4 participants

X Tutup