Skip to content

Commit

Permalink
Merge pull request #570 from savf/bugfix/Fix-crash-on-deactivated-cores
Browse files Browse the repository at this point in the history
Conditionally show frequency gauge based on whether CPU core is active
  • Loading branch information
rbonghi authored Sep 23, 2024
2 parents b66369b + c623a78 commit fbf121b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions jtop/gui/pcpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,14 @@ def print_cpu(self, stdscr, idx, cpu, pos_y, pos_x, size_h, size_w):
except curses.error:
pass
# Print info
freq = cpu['freq']
freq['online'] = cpu['online']
freq['name'] = "Frq"
try:
freq_gauge(stdscr, pos_y + size_h, pos_x, size_w, cpu['freq'])
except curses.error:
pass
if 'freq' in cpu:
freq = cpu['freq']
freq['online'] = cpu['online']
freq['name'] = "Frq"
try:
freq_gauge(stdscr, pos_y + size_h, pos_x, size_w, cpu['freq'])
except curses.error:
pass

def draw(self, key, mouse):
# Screen size
Expand Down

0 comments on commit fbf121b

Please sign in to comment.