mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Fix new watchdog timer environment check
This would of course cause a segfault if the environment variable isn't
defined. The regression was introduced in
8873c11e1d.
This commit is contained in:
@@ -70,7 +70,9 @@ bool is_watchdog_timer_disabled() {
|
||||
// This is safe because we're not storing the pointer anywhere and the
|
||||
// environment doesn't get modified anywhere
|
||||
// NOLINTNEXTLINE(concurrency-mt-unsafe)
|
||||
return getenv(disable_watchdog_timer_env_var) == "1"sv;
|
||||
const char* disable_watchdog_env = getenv(disable_watchdog_timer_env_var);
|
||||
|
||||
return disable_watchdog_env && disable_watchdog_env == "1"sv;
|
||||
}
|
||||
|
||||
bool pid_running(pid_t pid) {
|
||||
|
||||
Reference in New Issue
Block a user