From 69b98a44e852f0adf5b9c72af8100e926edc8257 Mon Sep 17 00:00:00 2001 From: M2j Date: Mon, 7 Jun 2010 11:37:27 +0200 Subject: [PATCH] fix for image names --- openlp/plugins/images/lib/mediaitem.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 081671fa9..a3b0a1050 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -117,12 +117,13 @@ class ImageMediaItem(MediaManagerItem): if items: for item in items: text = self.ListView.item(item.row()) - try: - os.remove( - os.path.join(self.servicePath, unicode(text.text()))) - except OSError: - #if not present do not worry - pass + if text: + try: + os.remove( + os.path.join(self.servicePath, unicode(text.text()))) + except OSError: + #if not present do not worry + pass self.ListView.takeItem(item.row()) SettingsManager.set_list(self.settingsSection, self.settingsSection, self.getFileList())