summaryrefslogtreecommitdiffstats
path: root/core/variant.cpp
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2020-02-23 10:06:13 +0100
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2020-02-23 10:06:13 +0100
commita5505ce64341029dad9ac45f5a4cbc5648ab1a52 (patch)
treeb01dfed03c508f0f8d8b7304965f57e4dbfef098 /core/variant.cpp
parent8b058d4b9a63799e29d3e9ef551bbdf8144f8f8b (diff)
downloadredot-engine-a5505ce64341029dad9ac45f5a4cbc5648ab1a52.tar.gz
Fixed crash when connecting a signal in GDScript
Diffstat (limited to 'core/variant.cpp')
-rw-r--r--core/variant.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp
index cdc9e47fc8..a215eee624 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1311,6 +1311,8 @@ Variant::operator uint64_t() const {
Variant::operator ObjectID() const {
if (type == INT) {
return ObjectID(_data._int);
+ } else if (type == OBJECT) {
+ return _get_obj().id;
} else {
return ObjectID();
}