Commit f47e979f authored by Guillaume Seguin's avatar Guillaume Seguin

Check if status thread has been started before joining it

parent cda29232
...@@ -1261,7 +1261,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1261,7 +1261,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def kill(self,e): def kill(self,e):
self.statuscheck = False self.statuscheck = False
if self.status_thread:
self.status_thread.join() self.status_thread.join()
self.status_thread = None
self.p.recvcb=None self.p.recvcb=None
self.p.disconnect() self.p.disconnect()
if hasattr(self,"feedrates_changed"): if hasattr(self,"feedrates_changed"):
...@@ -1720,7 +1722,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1720,7 +1722,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.store_predisconnect_state() self.store_predisconnect_state()
self.p.disconnect() self.p.disconnect()
self.statuscheck = False self.statuscheck = False
if self.status_thread:
self.status_thread.join() self.status_thread.join()
self.status_thread = None
self.connectbtn.SetLabel("Connect") self.connectbtn.SetLabel("Connect")
self.connectbtn.SetToolTip(wx.ToolTip("Connect to the printer")) self.connectbtn.SetToolTip(wx.ToolTip("Connect to the printer"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment