aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-09-07 20:47:33 +0000
committerOmar Polo <op@omarpolo.com>2022-09-07 20:47:33 +0000
commit0126d91d1d80d7d8e794b2176556fce969f165cd (patch)
tree6b189f1883a5e1819e85c1b3a4128b78373e4358 /server.c
parent760009951357d4c36991c4c6a62db973289b32d9 (diff)
add ge: gemini export!
Diffstat (limited to 'server.c')
-rw-r--r--server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/server.c b/server.c
index b87974e..f9e9dbe 100644
--- a/server.c
+++ b/server.c
@@ -1367,8 +1367,11 @@ loop(struct tls *ctx_, int sock4, int sock6, struct imsgbuf *ibuf)
event_add(&e6, NULL);
}
- event_set(&imsgev, ibuf->fd, EV_READ | EV_PERSIST, handle_dispatch_imsg, ibuf);
- event_add(&imsgev, NULL);
+ if (ibuf) {
+ event_set(&imsgev, ibuf->fd, EV_READ | EV_PERSIST,
+ handle_dispatch_imsg, ibuf);
+ event_add(&imsgev, NULL);
+ }
#ifdef SIGINFO
has_siginfo = 1;