Commit eaeb3073 authored by Guillaume Seguin's avatar Guillaume Seguin

Potential fix for segfault on OSX

parent 5649eee8
...@@ -764,8 +764,8 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -764,8 +764,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
if bedit.color.GetValue().strip()!="": if bedit.color.GetValue().strip()!="":
self.custombuttons[n].background = bedit.color.GetValue() self.custombuttons[n].background = bedit.color.GetValue()
self.cbutton_save(n, self.custombuttons[n]) self.cbutton_save(n, self.custombuttons[n])
bedit.Destroy() wx.CallAfter(bedit.Destroy)
self.cbuttons_reload() wx.CallAfter(self.cbuttons_reload)
def cbutton_remove(self, e, button): def cbutton_remove(self, e, button):
n = button.custombutton n = button.custombutton
...@@ -787,7 +787,7 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -787,7 +787,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self.cbutton_save(n+1, self.custombuttons[n+1]) self.cbutton_save(n+1, self.custombuttons[n+1])
#if self.custombuttons[-1] is None: #if self.custombuttons[-1] is None:
# del self.custombuttons[-1] # del self.custombuttons[-1]
self.cbuttons_reload() wx.CallAfter(self.cbuttons_reload)
def editbutton(self, e): def editbutton(self, e):
if e.IsCommandEvent() or e.ButtonUp(wx.MOUSE_BTN_RIGHT): if e.IsCommandEvent() or e.ButtonUp(wx.MOUSE_BTN_RIGHT):
......
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