[vlc-devel] commit: lua: assert that we have an item. (Pierre d'Herbemont )

git version control git at videolan.org
Thu Jan 7 02:38:27 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Jan  7 00:57:30 2010 +0100| [a36325f84f458338b4fe5c02ce2b77e728593e2c] | committer: Pierre d'Herbemont 

lua: assert that we have an item.

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

 modules/misc/lua/libs/input.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/misc/lua/libs/input.c b/modules/misc/lua/libs/input.c
index 105ae3c..87dd668 100644
--- a/modules/misc/lua/libs/input.c
+++ b/modules/misc/lua/libs/input.c
@@ -40,6 +40,7 @@
 
 #include <lua.h>        /* Low level lua C API */
 #include <lauxlib.h>    /* Higher level C API */
+#include <assert.h>
 
 #include "input.h"
 #include "playlist.h"
@@ -370,6 +371,7 @@ static const luaL_Reg vlclua_input_item_reg[] = {
 
 void luaopen_input_item( lua_State *L, input_item_t *item )
 {
+    assert(item);
     vlclua_input_item_get( L, item );
     lua_setfield( L, -2, "item" );
 }




More information about the vlc-devel mailing list