fixed possible segfault
git-svn-id: http://tint2.googlecode.com/svn/trunk@76 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
88661d034a
commit
466f4fb1db
1 changed files with 2 additions and 1 deletions
|
@ -100,6 +100,7 @@ void update_battery(struct batstate *data) {
|
||||||
seconds -= 60 * data->time.minutes;
|
seconds -= 60 * data->time.minutes;
|
||||||
data->time.seconds = seconds;
|
data->time.seconds = seconds;
|
||||||
|
|
||||||
|
if(energy_full > 0)
|
||||||
new_percentage = (energy_now*100)/energy_full;
|
new_percentage = (energy_now*100)/energy_full;
|
||||||
|
|
||||||
if(battery_low_status != 0 && battery_low_status == new_percentage && data->percentage > new_percentage) {
|
if(battery_low_status != 0 && battery_low_status == new_percentage && data->percentage > new_percentage) {
|
||||||
|
|
Loading…
Reference in a new issue