don't crash when there is no info
authorFelix Domke <tmbinc@elitedvb.net>
Tue, 11 Apr 2006 16:45:18 +0000 (16:45 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Tue, 11 Apr 2006 16:45:18 +0000 (16:45 +0000)
lib/python/Screens/MediaPlayer.py

index b38cb1b..5a46184 100644 (file)
@@ -316,7 +316,7 @@ class MediaPlayer(Screen, InfoBarSeek):
                        if self.session.nav.getCurrentlyPlayingServiceReference() is None or currref != self.session.nav.getCurrentlyPlayingServiceReference():
                                self.session.nav.playService(self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()])
                                info = eServiceCenter.getInstance().info(currref)
                        if self.session.nav.getCurrentlyPlayingServiceReference() is None or currref != self.session.nav.getCurrentlyPlayingServiceReference():
                                self.session.nav.playService(self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()])
                                info = eServiceCenter.getInstance().info(currref)
-                               description = info.getInfoString(currref, iServiceInformation.sDescription)
+                               description = info and info.getInfoString(currref, iServiceInformation.sDescription) or ""
                                self["title"].setText(description)
                        self.unPauseService()
                                
                                self["title"].setText(description)
                        self.unPauseService()