]> git.sesse.net Git - vlc/commitdiff
lua: check stream_UrlNew return value
authorRafaël Carré <funman@videolan.org>
Wed, 19 Sep 2007 16:21:08 +0000 (16:21 +0000)
committerRafaël Carré <funman@videolan.org>
Wed, 19 Sep 2007 16:21:08 +0000 (16:21 +0000)
modules/misc/lua/vlclua.c

index fabbdd9b79e428a9423f8c828e9444d73d25c906..35dcca4e274e5dbf77714586c7f182a0d89ef8eb 100644 (file)
@@ -86,6 +86,7 @@ int vlclua_stream_new( lua_State *p_state )
     psz_url = lua_tostring( p_state, 1 );
     lua_pop( p_state, i );
     p_stream = stream_UrlNew( p_this, psz_url );
+    if( !p_stream ) return 0;
     lua_pushlightuserdata( p_state, p_stream );
     return 1;
 }