aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_common.c')
-rw-r--r--src/lua/lua_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index bfe60c4da..1f9f7285d 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -114,7 +114,12 @@ lua_set_table_index (lua_State * L, const gchar *index, const gchar *value)
{
lua_pushstring (L, index);
- lua_pushstring (L, value);
+ if (value) {
+ lua_pushstring (L, value);
+ }
+ else {
+ lua_pushnil (L);
+ }
lua_settable (L, -3);
}