]> git.sesse.net Git - vlc/commitdiff
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 3f89e0546808e10ddcbd9aa36bbb145391344d8a..524ce2a71ec8011a5a2c9c79ecaa9a32acc70604 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 );