Skip to content

Commit

Permalink
Catch IndexError on empty Variables state
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanderkamp authored and inducer committed Jun 5, 2024
1 parent e340f1d commit b0ea4cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b0ea4cd

Please sign in to comment.