[vlc-commits] avoid crash where vlc.net.stat returns nil for a file ( such as alias on mac os)
Rob Jonson
git at videolan.org
Mon Feb 27 12:36:42 CET 2012
vlc | branch: master | Rob Jonson <rob at hobbyistsoftware.com> | Sat Feb 25 13:55:21 2012 +0000| [7cab5a8c5d67596a4d73a5e9194a52d3736725f0] | committer: Jean-Baptiste Kempf
avoid crash where vlc.net.stat returns nil for a file (such as alias on mac os)
resending with spaces instead of tabs for indenting.
please backport for 2.0.1
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7cab5a8c5d67596a4d73a5e9194a52d3736725f0
---
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..52f3531 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
More information about the vlc-commits
mailing list