From cf7630d3e3066827e21f38091295907e73f90845 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 12 Jan 2016 21:14:04 +0100 Subject: [PATCH] Fix crash when sending Pdf live. --- openlp/plugins/presentations/lib/messagelistener.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/presentations/lib/messagelistener.py b/openlp/plugins/presentations/lib/messagelistener.py index 0f33abeb9..d8af1dd6b 100644 --- a/openlp/plugins/presentations/lib/messagelistener.py +++ b/openlp/plugins/presentations/lib/messagelistener.py @@ -349,16 +349,17 @@ class MessageListener(object): # When presenting PDF/XPS/OXPS, we are using the image presentation code, # so handler & processor is set to None, and we skip adding the handler. self.handler = None - if self.handler == self.media_item.automatic: - self.handler = self.media_item.find_controller_by_type(file) - if not self.handler: - return else: - # the saved handler is not present so need to use one based on file suffix. - if not self.controllers[self.handler].available: + if self.handler == self.media_item.automatic: self.handler = self.media_item.find_controller_by_type(file) if not self.handler: return + else: + # the saved handler is not present so need to use one based on file suffix. + if not self.controllers[self.handler].available: + self.handler = self.media_item.find_controller_by_type(file) + if not self.handler: + return if is_live: controller = self.live_handler else: