]> git.sesse.net Git - vlc/commitdiff
lua: assert that we have an item.
authorPierre d'Herbemont <pdherbemont@free.fr>
Wed, 6 Jan 2010 23:57:30 +0000 (00:57 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Thu, 7 Jan 2010 01:37:34 +0000 (02:37 +0100)
modules/misc/lua/libs/input.c

index 105ae3cf9b4cb0e1e1fa7f09b1efc483f2564fae..87dd6683ac79e60a880df6a016771c7d0985c714 100644 (file)
@@ -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" );
 }