diff options
author | David <dbphillipsnz@gmail.com> | 2014-09-27 13:03:09 +1200 |
---|---|---|
committer | David <dbphillipsnz@gmail.com> | 2014-09-27 13:03:09 +1200 |
commit | 3ac35c199e59585bd3c9e8348c5f4b5a7137ff41 (patch) | |
tree | 12fc88b1b30f42b6932cd0a076dc3456868587d7 /tray.c | |
parent | d7de3b282bb6c9bb675785c08d3858c14381a209 (diff) | |
download | paramano-3ac35c199e59585bd3c9e8348c5f4b5a7137ff41.tar.xz |
Fixed bug affecting CPUs with multiple cores
Diffstat (limited to 'tray.c')
-rw-r--r-- | tray.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -340,8 +340,10 @@ void tray_update_icon_percent() char* file; gulong max_frequency = gf_freqi(0, 0); gint adjusted_percent = 0; - // If no governor, set percentage to 0. This if statement fixes an FPE a few lines down - if (gg_number() == 0) + + // If max_frequency is 0, we don't want to divide by it, + // so give up, call it a day, and have a simple icon + if (max_frequency == 0) { adjusted_percent = 0; } else { |