Merge pull request #4809 from Alexays/copilot/fix-unhandled-exception
Fix unhandled JSON exception in signal handler
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -51,3 +51,4 @@ result
|
||||
result-*
|
||||
|
||||
.ccls-cache
|
||||
_codeql_detected_source_root
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user