diff --git a/pudb/debugger.py b/pudb/debugger.py index dc06d9ef..063f0c32 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -994,9 +994,12 @@ def collapse_current(var, pos, iinfo): return None def change_var_state(w, size, key): - pos = self.var_list._w.focus_position - var = self.var_list._w.focus + try: + pos = self.var_list._w.focus_position + except IndexError: + return + var = self.var_list._w.focus if var is None: return