Merge pull request #4809 from Alexays/copilot/fix-unhandled-exception

Fix unhandled JSON exception in signal handler
This commit is contained in:
Alexis Rouillard
2026-02-04 10:04:16 +01:00
committed by GitHub
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -51,3 +51,4 @@ result
result-*
.ccls-cache
_codeql_detected_source_root

View File

@ -136,7 +136,7 @@ void waybar::modules::Custom::waitingWorker() {
}
void waybar::modules::Custom::refresh(int sig) {
if (sig == SIGRTMIN + config_["signal"].asInt()) {
if (config_["signal"].isInt() && sig == SIGRTMIN + config_["signal"].asInt()) {
thread_.wake_up();
}
}

View File

@ -41,7 +41,7 @@ void waybar::modules::Image::delayWorker() {
}
void waybar::modules::Image::refresh(int sig) {
if (sig == SIGRTMIN + config_["signal"].asInt()) {
if (config_["signal"].isInt() && sig == SIGRTMIN + config_["signal"].asInt()) {
thread_.wake_up();
}
}