Skip to content

Commit

Permalink
Gui - fix: undefined self.new_thread bug
Browse files Browse the repository at this point in the history
  • Loading branch information
regeciovad committed Mar 5, 2016
1 parent d3d5666 commit c8a5572
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rpg/gui/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;" +
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8a5572

Please sign in to comment.