Don't segfault when looking for art with the lua scripts. Thanks to ILEoo for spoting...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 27 Jun 2008 11:29:10 +0000 (13:29 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 27 Jun 2008 11:49:59 +0000 (13:49 +0200)
modules/misc/lua/meta.c

index 3f89e05..524ce2a 100644 (file)
@@ -58,6 +58,8 @@ static lua_State *vlclua_meta_init( vlc_object_t *p_this,
 /*****************************************************************************
  * Init lua
  *****************************************************************************/
+static luaL_Reg p_reg[] = { { NULL, NULL } };
+
 static lua_State * vlclua_meta_init( vlc_object_t *p_this, input_item_t * p_item )
 {
     lua_State * L = luaL_newstate();
@@ -71,7 +73,7 @@ static lua_State * vlclua_meta_init( vlc_object_t *p_this, input_item_t * p_item
     /* Load Lua libraries */
     luaL_openlibs( L ); /* XXX: Don't open all the libs? */
 
-    luaL_register( L, "vlc", NULL /* FIXME ? */ );
+    luaL_register( L, "vlc", p_reg );
 
     luaopen_msg( L );
     luaopen_stream( L );