From 432a446a7b3a6fa9ce8736bffbbe48daea578feb Mon Sep 17 00:00:00 2001 From: David Date: Sat, 27 Sep 2014 13:03:09 +1200 Subject: Fixed bug affecting CPUs with multiple cores --- tray.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tray.c') diff --git a/tray.c b/tray.c index afc78c7..110e26b 100644 --- a/tray.c +++ b/tray.c @@ -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 { -- cgit v1.1