diff options
author | aristocratos <gnmjpl@gmail.com> | 2021-10-17 22:55:36 +0200 |
---|---|---|
committer | aristocratos <gnmjpl@gmail.com> | 2021-10-17 22:55:36 +0200 |
commit | 7d89c75abb3771005ed6fbbb56aa75859cf4f00b (patch) | |
tree | 975104952f55506f4f29f3fd36b554b68b7d5de7 | |
parent | 368ed273ec0dab28fdf3d1e0cefaaebf43367a82 (diff) |
FIxed: Battery error if non existant battery named is entered
-rw-r--r-- | src/linux/btop_collect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index fdaaf9a..2a5a31d 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -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; |