Commit 0da65f14 authored by Keegi's avatar Keegi

Fix exception on removing the last custombutton when there are no other custombuttons

parent 16fd9fd0
......@@ -727,7 +727,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
n = button.custombutton
self.custombuttons[n]=None
self.cbutton_save(n,None)
while self.custombuttons[-1] is None:
while len(self.custombuttons) and self.custombuttons[-1] is None:
del self.custombuttons[-1]
self.cbuttons_reload()
......
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