From a5505ce64341029dad9ac45f5a4cbc5648ab1a52 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Sun, 23 Feb 2020 10:06:13 +0100 Subject: Fixed crash when connecting a signal in GDScript --- core/variant.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/variant.cpp') 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(); } -- cgit v1.2.3