Skip to content

Commit

Permalink
Fix if-statment guarding for invalid vector access (#996)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Burandt <[email protected]>
  • Loading branch information
cburandt authored Dec 18, 2024
1 parent 60f5889 commit d8db948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/EnergyNode/energy_grid/energyImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void energyImpl::init() {
});
}

if (!mod->r_price_information.empty()) {
if (!mod->r_powermeter.empty()) {
mod->r_powermeter[0]->subscribe_powermeter([this](types::powermeter::Powermeter p) {
EVLOG_debug << "Incoming powermeter readings: " << p;
std::scoped_lock lock(energy_mutex);
Expand Down

0 comments on commit d8db948

Please sign in to comment.