Merge pull request #5121 from InetAddress/fix-battery-hotplug-crash-1
fix(battery): prevent crash when removing a hot-plugged device
This commit is contained in:
@@ -153,7 +153,7 @@ void waybar::modules::Battery::refreshBatteries() {
|
||||
}
|
||||
}
|
||||
} catch (fs::filesystem_error& e) {
|
||||
throw std::runtime_error(e.what());
|
||||
spdlog::warn("Battery directory tracking failed: {}", e.what());
|
||||
}
|
||||
if (warnFirstTime_ && batteries_.empty()) {
|
||||
if (config_["bat"].isString()) {
|
||||
|
||||
Reference in New Issue
Block a user