[vlc-devel] [PATCH] avoid crash where vlc.net.stat returns nil for a file (such as alias on mac os)

Rob Jonson rob at hobbyistsoftware.com
Fri Feb 24 15:03:25 CET 2012


let me know if I need to re-send this for 2.1

On 24 February 2012 12:29, Rob Jonson <rob at hobbyistsoftware.com> wrote:
> ---
>  share/lua/intf/modules/httprequests.lua |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
> index 262f618..9dcec8d 100644
> --- a/share/lua/intf/modules/httprequests.lua
> +++ b/share/lua/intf/modules/httprequests.lua
> @@ -396,8 +396,12 @@ getbrowsetable = function ()
>                 local path, name =  df, f
>                 local element={}
>
> -                for k,v in pairs(s) do
> -                    element[k]=v
> +                               if (s) then
> +                       for k,v in pairs(s) do
> +                       element[k]=v
> +                       end
> +                else
> +                    element["type"]="unknown"
>                 end
>                 element["path"]=path
>                 element["name"]=name
> --
> 1.7.5
>



-- 





Hobbyist Software is a trading name of Hobbyist Software Limited.
Registered office Flat 4 Eastmead Court, Bristol BS9 1HP. Registered
in England. Company no:7876492



More information about the vlc-devel mailing list