diff options
Diffstat (limited to 'modules/visual_script/visual_script_flow_control.cpp')
-rw-r--r-- | modules/visual_script/visual_script_flow_control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index bbbb995635..19bbd834cc 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -803,7 +803,7 @@ public: //if the script is not in use by anyone, we can safely assume whatever we got is not casting to it. return 1; } - Ref<Script> cast_script = Ref<Resource>(ResourceCache::get(script)); + Ref<Script> cast_script = ResourceCache::get_ref(script); if (!cast_script.is_valid()) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Script path is not a script: " + script; |