when no service is currently playing, serviceinfo is displayed without killing enigma2
[enigma2.git] / lib / python / Screens / ServiceInfo.py
index 9a8abdb..6b0a2e0 100644 (file)
@@ -51,8 +51,12 @@ class ServiceInfo(Screen):
                        self.info = service.info()
                else:
                        self.info = None
-               
-               Labels = ( ("Name",  ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()),
+
+               if self.session.nav.getCurrentlyPlayingServiceReference() is not None:
+                       name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()
+               else:
+                       name = "N/A"
+               Labels = ( ("Name",  name),
                                   ("Provider", self.getValue(iServiceInformation.sProvider)),
                                   ("VideoPID", self.getValue(iServiceInformation.sVideoPID)),
                                   ("AudioPID", self.getValue(iServiceInformation.sAudioPID)),