diff --git a/mud.c b/mud.c index cdd33b4..f0d8ef9 100644 --- a/mud.c +++ b/mud.c @@ -985,6 +985,9 @@ mud_create(struct sockaddr *addr) int mud_get_fd(struct mud *mud) { + if (!mud) + return -1; + return mud->fd; }