diff options
Diffstat (limited to 'libmproxy/console/kveditor.py')
-rw-r--r-- | libmproxy/console/kveditor.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmproxy/console/kveditor.py b/libmproxy/console/kveditor.py index ee1daaa9..f065cf30 100644 --- a/libmproxy/console/kveditor.py +++ b/libmproxy/console/kveditor.py @@ -129,8 +129,9 @@ class KVWalker(urwid.ListWalker): return self._insert(min(self.focus + 1, len(self.lst))) def start_edit(self): - self.editing = KVItem(self.focus_col, True, self.maxk, *self.lst[self.focus]) - self._modified() + if self.lst: + self.editing = KVItem(self.focus_col, True, self.maxk, *self.lst[self.focus]) + self._modified() def stop_edit(self): if self.editing: |