Commit 67cfc814 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix NULL pointer dereferencing due to c58a5af7.

parent 1f01a7c6
......@@ -162,14 +162,13 @@ static int vlclua_datadir_list( lua_State *L )
{
const char *psz_dirname = luaL_checkstring( L, 1 );
char **ppsz_dir_list = NULL;
char **ppsz_dir = ppsz_dir_list;
int i = 1;
if( vlclua_dir_list( vlclua_get_this( L ), psz_dirname, &ppsz_dir_list )
!= VLC_SUCCESS )
return 0;
lua_newtable( L );
for( ; *ppsz_dir; ppsz_dir++ )
for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
{
lua_pushstring( L, *ppsz_dir );
lua_rawseti( L, -2, i );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment