diff --git a/src/calibre/gui2/threaded_jobs.py b/src/calibre/gui2/threaded_jobs.py index eb8667a713..9e16f88a1a 100644 --- a/src/calibre/gui2/threaded_jobs.py +++ b/src/calibre/gui2/threaded_jobs.py @@ -100,7 +100,8 @@ class ThreadedJob(BaseJob): try: self.consolidate_log() except: - self.log.exception('Log consolidation failed') + if self.log is not None: + self.log.exception('Log consolidation failed') # No need to keep references to these around anymore self.func = self.args = self.kwargs = self.notifications = None