[vlc-devel] commit: Don't segfault when looking for art with the lua scripts. Thanks to ILEoo for spoting the bug. (Antoine Cellerier )

git version control git at videolan.org
Fri Jun 27 13:47:51 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Fri Jun 27 13:29:10 2008 +0200| [6f5ee98782b887d86e40e04b9b88ed0b38ba117e]

Don't segfault when looking for art with the lua scripts. Thanks to ILEoo for spoting the bug.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f5ee98782b887d86e40e04b9b88ed0b38ba117e
---

 modules/misc/lua/meta.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/misc/lua/meta.c b/modules/misc/lua/meta.c
index 3f89e05..524ce2a 100644
--- a/modules/misc/lua/meta.c
+++ b/modules/misc/lua/meta.c
@@ -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 );




More information about the vlc-devel mailing list