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:
Alexis Rouillard
2026-07-03 19:44:01 +02:00
committed by GitHub
+1 -1
View File
@@ -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()) {