mirror of https://github.com/aristocratos/btop.git
FIxed: Battery error if non existant battery named is entered
This commit is contained in:
parent
368ed273ec
commit
7d89c75abb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue