Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Commit b3526e3

Browse files
authored
Changes for GDScript null value (#134)
1 parent d34b139 commit b3526e3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/luaState.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ LuaError *LuaState::pushVariant(lua_State *state, Variant var) {
350350
break;
351351
}
352352
case Variant::Type::OBJECT: {
353+
if (var.operator Object *() == nullptr) {
354+
lua_pushnil(state);
355+
break;
356+
}
353357
// If the type being pushed is a lua error, Raise a error
354358
#ifndef LAPI_GDEXTENSION
355359
if (LuaError *err = Object::cast_to<LuaError>(var.operator Object *()); err != nullptr) {

0 commit comments

Comments
 (0)