mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Prevents some warnings from appearing in visual scripts
This commit is contained in:
parent
b76dfde329
commit
88088f351a
2 changed files with 19 additions and 2 deletions
|
@ -191,7 +191,10 @@ PropertyInfo VisualScriptFunction::get_input_value_port_info(int p_idx) const {
|
|||
}
|
||||
|
||||
PropertyInfo VisualScriptFunction::get_output_value_port_info(int p_idx) const {
|
||||
ERR_FAIL_INDEX_V(p_idx, arguments.size(), PropertyInfo());
|
||||
// Need to check it without ERR_FAIL_COND, to prevent warnings from appearing on node creation via dragging.
|
||||
if (p_idx < 0 || p_idx >= arguments.size()) {
|
||||
return PropertyInfo();
|
||||
}
|
||||
PropertyInfo out;
|
||||
out.type = arguments[p_idx].type;
|
||||
out.name = arguments[p_idx].name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue