From 67ac08bd138e956111e98a80a3c3adabf5e71d48 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 8 Apr 2006 13:44:54 +0000 Subject: fix crash when press red button in empty timerlist fix crash when press ok directly after e2 start --- lib/python/Screens/ChannelSelection.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'lib/python/Screens/ChannelSelection.py') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index d8aa39d4..065d36ca 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -873,18 +873,19 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect self.session.nav.playService(nref) self.saveRoot() self.saveChannel() - tmp=self.servicePath[:] - tmp.append(nref) - try: - del self.history[self.history_pos+1:] - except: - pass - self.history.append(tmp) - hlen = len(self.history) - if hlen > HISTORYSIZE: - del self.history[0] - hlen -= 1 - self.history_pos = hlen-1 + if self.servicePath is not None: + tmp=self.servicePath[:] + tmp.append(nref) + try: + del self.history[self.history_pos+1:] + except: + pass + self.history.append(tmp) + hlen = len(self.history) + if hlen > HISTORYSIZE: + del self.history[0] + hlen -= 1 + self.history_pos = hlen-1 def historyBack(self): hlen = len(self.history) -- cgit v1.2.3