From f35f84f19319a37dea5037c53b6f6f6efbfb846d Mon Sep 17 00:00:00 2001 From: reichi Date: Thu, 4 Oct 2018 11:22:13 +0200 Subject: [PATCH] twitch: fix crash when pressing delete on empty favorite list --- twitchtv/src/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twitchtv/src/plugin.py b/twitchtv/src/plugin.py index 33a4829b..0be576fb 100644 --- a/twitchtv/src/plugin.py +++ b/twitchtv/src/plugin.py @@ -543,7 +543,8 @@ class TwitchChannelList(Screen): def removeFromFav(self): if self._channels: return - channel = self["list"].l.getCurrentSelection()[1] + channel = self["list"].l.getCurrentSelection() + channel = channel and channel[1] if not channel: return boundCallback = boundFunction(self.callbackRemoveFromFav, channel) -- 2.20.1