mirror of
https://github.com/xzeldon/htop.git
synced 2025-01-31 09:07:25 +03:00
only reinit initializable meters
This commit is contained in:
parent
219bb9ccff
commit
b57b7e9a9e
6
Header.c
6
Header.c
@ -136,11 +136,13 @@ void Header_defaultMeters(Header* this) {
|
||||
void Header_reinit(Header* this) {
|
||||
for (int i = 0; i < Vector_size(this->leftMeters); i++) {
|
||||
Meter* meter = (Meter*) Vector_get(this->leftMeters, i);
|
||||
meter->type->init(meter);
|
||||
if (meter->type->init)
|
||||
meter->type->init(meter);
|
||||
}
|
||||
for (int i = 0; i < Vector_size(this->rightMeters); i++) {
|
||||
Meter* meter = (Meter*) Vector_get(this->rightMeters, i);
|
||||
meter->type->init(meter);
|
||||
if (meter->type->init)
|
||||
meter->type->init(meter);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user