[vlc-commits] luasd: handle probing error more gracefully
Pierre Ynard
git at videolan.org
Wed Nov 16 07:57:11 CET 2016
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Nov 16 07:56:44 2016 +0100| [ceb9d2bad5af6179196f299bba52930d5674a6df] | committer: Pierre Ynard
luasd: handle probing error more gracefully
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ceb9d2bad5af6179196f299bba52930d5674a6df
---
modules/lua/vlc.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index b175430..59eeb2f 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -692,12 +692,10 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
else
{
lua_getfield( L, -1, "title" );
- if( !lua_isstring( L, -1 ) )
- {
- free( psz_filename );
- goto error;
- }
- psz_longname = lua_tostring( L, -1 );
+ if( lua_isstring( L, -1 ) )
+ psz_longname = lua_tostring( L, -1 );
+ else
+ psz_longname = *ppsz_file;
}
char *psz_file_esc = config_StringEscape( *ppsz_file );
More information about the vlc-commits
mailing list