diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 5c70ac18d..d01f8bf42 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -392,10 +392,16 @@ class ServiceItem(object): """ Returns the title of the raw frame """ - return self._raw_frames[row][u'title'] + try: + return self._raw_frames[row][u'title'] + except: + return u'' def get_frame_path(self, row=0): """ Returns the path of the raw frame """ - return self._raw_frames[row][u'path'] + try: + return self._raw_frames[row][u'path'] + except: + return u'' diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 2c9381a70..98481dfed 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -268,12 +268,22 @@ class PresentationMediaItem(MediaManagerItem): doc.load_presentation() i = 1 img = doc.get_thumbnail_path(i, True) - while img: - service_item.add_from_command(path, name, img) - i = i + 1 - img = doc.get_thumbnail_path(i, True) - doc.close_presentation() - return True + if img: + while img: + service_item.add_from_command(path, name, img) + i = i + 1 + img = doc.get_thumbnail_path(i, True) + doc.close_presentation() + return True + else: + # File is no longer present + criticalErrorMessageBox( + translate('PresentationPlugin.MediaItem', + 'Missing Presentation'), + unicode(translate('PresentationPlugin.MediaItem', + 'The Presentation %s is incomplete please reload.')) + % filename) + return False else: # File is no longer present criticalErrorMessageBox(