diff options
Diffstat (limited to 'chardev/char-socket.c')
-rw-r--r-- | chardev/char-socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 9061981..b7863b8 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -387,6 +387,9 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len) static GSource *tcp_chr_add_watch(Chardev *chr, GIOCondition cond) { SocketChardev *s = SOCKET_CHARDEV(chr); + if (!s->ioc) { + return NULL; + } return qio_channel_create_watch(s->ioc, cond); } |