From 440a5ca5afd76a0b1fb4e5a4a04ab366ae98cf54 Mon Sep 17 00:00:00 2001 From: Kliment Yanev Date: Mon, 14 Nov 2011 16:20:32 +0100 Subject: [PATCH] Use CallAfter to prevent mysterious double free or corruption error in wx. --- pronterface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pronterface.py b/pronterface.py index 4e4dda3..3ac803f 100755 --- a/pronterface.py +++ b/pronterface.py @@ -135,8 +135,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole): wx.CallAfter(i.Enable) # Enable XYButtons and ZButtons - self.xyb.enable() - self.zb.enable() + wx.CallAfter(self.xyb.enable) + wx.CallAfter(self.zb.enable) if self.filename: wx.CallAfter(self.printbtn.Enable) @@ -1327,8 +1327,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole): wx.CallAfter(i.Disable) # Disable XYButtons and ZButtons - self.xyb.disable() - self.zb.disable() + wx.CallAfter(self.xyb.disable) + wx.CallAfter(self.zb.disable) if self.paused: self.p.paused=0