beremiz

e27d253bd0ba
Parents e31d5a36d1f3
Children 4f7a0c40a7c3
fix problem if _should_write is called by expired timer after
termination of wx application.
--- a/BeremizIDE.py Mon Aug 28 10:49:53 2017 +0000
+++ b/BeremizIDE.py Fri Sep 08 11:53:48 2017 +0300
@@ -163,9 +163,11 @@
self.TimerAccessLock.release()
def _should_write(self):
- wx.CallAfter(self._write)
+ app = wx.GetApp()
+ if app is not None:
+ wx.CallAfter(self._write)
+
if MainThread == currentThread().ident:
- app = wx.GetApp()
if app is not None:
if self.YieldLock.acquire(0):
app.Yield()