We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d619c61 + 55ba260 commit 50512f0Copy full SHA for 50512f0
src/variant/variant.cpp
@@ -171,7 +171,12 @@ Variant::Variant(const godot::RID &v) {
171
}
172
173
Variant::Variant(const Object *v) {
174
- from_type_constructor[OBJECT](ptr(), const_cast<GodotObject **>(&v->_owner));
+ if (v) {
175
+ from_type_constructor[OBJECT](ptr(), const_cast<GodotObject **>(&v->_owner));
176
+ } else {
177
+ GodotObject *nullobject = nullptr;
178
+ from_type_constructor[OBJECT](ptr(), &nullobject);
179
+ }
180
181
182
Variant::Variant(const Callable &v) {
0 commit comments