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

master
Keegi 2011-09-13 14:41:05 +03:00
parent 16fd9fd04d
commit 0da65f14d0
1 changed files with 1 additions and 1 deletions

View File

@ -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()