Merge pull request #36481 from nekomatata/fix-crash-connect-callable

Fixed crash when connecting a signal in GDScript
This commit is contained in:
Rémi Verschelde
2020-02-25 13:26:08 +01:00
committed by GitHub
2 changed files with 12 additions and 4 deletions

View File

@ -1549,6 +1549,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();
}