FIxed: Battery error if non existant battery named is entered

This commit is contained in:
aristocratos 2021-10-17 22:55:36 +02:00
parent 368ed273ec
commit 7d89c75abb

View file

@ -535,7 +535,7 @@ namespace Cpu {
auto& battery_sel = Config::getS("selected_battery");
if ((battery_sel == "Auto" and auto_sel.empty())) {
if (auto_sel.empty()) {
for (auto& [name, bat] : batteries) {
if (bat.device_type == "Battery") {
auto_sel = name;