summaryrefslogtreecommitdiff
path: root/core/callable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/callable.cpp')
-rw-r--r--core/callable.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/callable.cpp b/core/callable.cpp
index 4a5ae3a248..2bb9ab167b 100644
--- a/core/callable.cpp
+++ b/core/callable.cpp
@@ -78,6 +78,12 @@ StringName Callable::get_method() const {
return method;
}
+CallableCustom *Callable::get_custom() const {
+ ERR_FAIL_COND_V_MSG(!is_custom(), NULL,
+ vformat("Can't get custom on non-CallableCustom \"%s\".", operator String()));
+ return custom;
+}
+
uint32_t Callable::hash() const {
if (is_custom()) {
return custom->hash();