fix(custom/graph): guard signal config with isInt() to avoid SIGABRT
refresh() called config_["signal"].asInt() unconditionally on every RT signal; a non-integer "signal" value throws Json::LogicError and aborts Waybar. Matches the guard already present in custom/image/idle_inhibitor. Fixes #3514.
This commit is contained in:
@@ -139,7 +139,7 @@ void waybar::modules::CustomGraph::waitingWorker() {
|
||||
}
|
||||
|
||||
void waybar::modules::CustomGraph::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