Merge pull request #36359 from vnen/variant-reference-fix
Fix Ref(Variant) constructor to properly check the object type
This commit is contained in:
commit
4581a9373c
1 changed files with 4 additions and 4 deletions
|
@ -170,9 +170,9 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
Reference *r = Object::cast_to<Reference>(object);
|
||||
T *r = Object::cast_to<T>(object);
|
||||
if (r && r->reference()) {
|
||||
reference = static_cast<T *>(r);
|
||||
reference = r;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,9 +226,9 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
Reference *r = Object::cast_to<Reference>(object);
|
||||
T *r = Object::cast_to<T>(object);
|
||||
if (r && r->reference()) {
|
||||
reference = static_cast<T *>(r);
|
||||
reference = r;
|
||||
} else {
|
||||
reference = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue