summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
-rw-r--r--modules/gdscript/gd_functions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 5d67f3cac0..d3f7dcd35f 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -847,8 +847,9 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument=0;
r_ret=Variant();
+ } else {
+ r_ret=ResourceLoader::load(*p_args[0]);
}
- r_ret=ResourceLoader::load(*p_args[0]);
} break;
case INST2DICT: {