summaryrefslogtreecommitdiff
path: root/core/func_ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/func_ref.cpp')
-rw-r--r--core/func_ref.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/func_ref.cpp b/core/func_ref.cpp
index 9c0e1698c2..4427d94d2a 100644
--- a/core/func_ref.cpp
+++ b/core/func_ref.cpp
@@ -65,12 +65,14 @@ void FuncRef::set_function(const StringName &p_func) {
}
bool FuncRef::is_valid() const {
- if (id.is_null())
+ if (id.is_null()) {
return false;
+ }
Object *obj = ObjectDB::get_instance(id);
- if (!obj)
+ if (!obj) {
return false;
+ }
return obj->has_method(function);
}