only reinit initializable meters

This commit is contained in:
Hisham Muhammad 2011-03-29 15:02:46 +00:00
parent 219bb9ccff
commit b57b7e9a9e
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}