Skip to content

Fix null material RID crash in ShaderMaterial property list#118356

Open
Infiland wants to merge 1 commit intogodotengine:masterfrom
Infiland:issue-118344
Open

Fix null material RID crash in ShaderMaterial property list#118356
Infiland wants to merge 1 commit intogodotengine:masterfrom
Infiland:issue-118344

Conversation

@Infiland
Copy link
Copy Markdown
Contributor

@Infiland Infiland commented Apr 9, 2026

Fixes #118344.

The material_set_param call added in #110287 in ShaderMaterial::_get_property_list() does not check if the material RID is valid before use. When local_to_scene is enabled, the material RID is not yet initialized during property list generation, causing a null material error.

This adds a validity check matching the pattern used by every other material_set_param call site in the same file. The default value is still cached in param_cache, so it gets applied when _check_material_rid() lazily creates the material.

@Infiland Infiland requested a review from a team as a code owner April 9, 2026 19:40
@Nintorch Nintorch added this to the 4.7 milestone Apr 10, 2026
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.

Parameter "material" is null error

2 participants