[vlc-commits] lua cli: don't error out on get_length if there is no input

Konstantin Pavlov git at videolan.org
Mon Nov 19 09:59:29 CET 2012


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Mon Nov 19 12:39:01 2012 +0400| [0d84e5b00ff95c8857f017bd87c1ef2600364040] | committer: Konstantin Pavlov

lua cli: don't error out on get_length if there is no input

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0d84e5b00ff95c8857f017bd87c1ef2600364040
---

 share/lua/intf/cli.lua |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index db9e795..3e88bb9 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -412,7 +412,11 @@ end
 function get_time(var)
     return function(name,client)
         local input = vlc.object.input()
-        client:append(math.floor(vlc.var.get( input, var )))
+	if input then
+	    client:append(math.floor(vlc.var.get( input, var )))
+	else
+	    client:append("")
+	end
     end
 end
 



More information about the vlc-commits mailing list