[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 13:29:27 CET 2012


---
 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




More information about the vlc-devel mailing list