Core: Сheck r_error
after calling callp()
#96344
Merged
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.
The engine has a practice of using return value for error messages if
r_error
is notCALL_OK
. However,r_error
is not checked in some places (use= .*\bcallp\b
to find them).So #94511 caused a regression because the Inspector uses
bool(object->call("_hide_script_from_inspector"))
to determine whether to hide the script property. AndPlaceHolderScriptInstance::callp()
now returns an error message.godot/editor/editor_inspector.cpp
Lines 3023 to 3026 in a5830f6
godot/core/object/script_language.cpp
Lines 707 to 718 in a5830f6