aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/universe.cpp')
-rw-r--r--src/universe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index c487ac0..66da147 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -60,7 +60,7 @@ Universe* universe_create(lua_State* L)
60 60
61void universe_store(lua_State* L, Universe* U) 61void universe_store(lua_State* L, Universe* U)
62{ 62{
63 ASSERT_L(universe_get(L) == nullptr); 63 ASSERT_L(!U || universe_get(L) == nullptr);
64 STACK_CHECK_START_REL(L, 0); 64 STACK_CHECK_START_REL(L, 0);
65 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata( L, U) : lua_pushnil( L); }); 65 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata( L, U) : lua_pushnil( L); });
66 STACK_CHECK( L, 0); 66 STACK_CHECK( L, 0);