diff --git a/rpg/gui/wizard.py b/rpg/gui/wizard.py index 28fc35d..e7ccaa6 100644 --- a/rpg/gui/wizard.py +++ b/rpg/gui/wizard.py @@ -106,6 +106,7 @@ def __init__(self, Wizard, parent=None): super(ImportPage, self).__init__(parent) self.base = Wizard.base + self.new_thread = None self.redQLineEdit = ("QLineEdit { border-style: solid;" + "border-width: 1px;" + "border-color: #FF3333;" + @@ -249,9 +250,10 @@ def cleanupPage(self): """ Stops the thread (there are no official way to stop thread. This will unlocked thread and it will be stopped with GUI - without error). """ - self.new_thread._tstate_lock = None - self.new_thread._stop() - self.new_thread.join() + if self.new_thread: + self.new_thread._tstate_lock = None + self.new_thread._stop() + self.new_thread.join() def nextId(self): ''' [int] Function that determines the next page after the current one