Fix null material RID crash in ShaderMaterial property list#118356
Open
Infiland wants to merge 1 commit intogodotengine:masterfrom
Open
Fix null material RID crash in ShaderMaterial property list#118356Infiland wants to merge 1 commit intogodotengine:masterfrom
Infiland wants to merge 1 commit intogodotengine:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #118344.
The
material_set_paramcall added in #110287 inShaderMaterial::_get_property_list()does not check if the material RID is valid before use. Whenlocal_to_sceneis 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_paramcall site in the same file. The default value is still cached inparam_cache, so it gets applied when_check_material_rid()lazily creates the material.