From a74b923de0aacd9c93aa00eda9f706e58a488d32 Mon Sep 17 00:00:00 2001 From: icedream Date: Fri, 6 Nov 2015 23:27:31 +0100 Subject: [PATCH] Fix crash in "current" command when nothing is playing. --- app.iced | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.iced b/app.iced index b18f3f2..24d1bd2 100644 --- a/app.iced +++ b/app.iced @@ -188,6 +188,10 @@ ts3clientService.on "started", (ts3proc) => switch name.toLowerCase() when "current" item = vlc.playlist.items[vlc.playlist.currentItem] + if not item? + ts3query?.sendtextmessage args.targetmode, invoker.id, "Not playing anything at the moment." + return + info = vlcMediaInfo[item.mrl] url = info?.originalUrl or item.mrl title = info?.title or item.mrl