summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/sd-event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index ec18af43d5..90cdeda513 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -1412,6 +1412,9 @@ static int event_arm_timer(
a = prioq_peek(earliest);
if (!a || a->enabled == SD_EVENT_OFF) {
+ if (timer_fd < 0)
+ return 0;
+
if (*next == (usec_t) -1)
return 0;