]> git.sesse.net Git - vlc/commitdiff
lua cli: don't error out on get_length if there is no input
authorKonstantin Pavlov <thresh@videolan.org>
Mon, 19 Nov 2012 08:39:01 +0000 (12:39 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Mon, 19 Nov 2012 08:39:01 +0000 (12:39 +0400)
share/lua/intf/cli.lua

index db9e7954dbb52fc56792f1b18760bbbe5c2b356f..3e88bb9acb1a6d8dd9890bea600ee7f01a082fce 100644 (file)
@@ -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