diff options
-rw-r--r-- | src/xcb.h | 2 | ||||
-rw-r--r-- | src/xcb_conn.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -483,7 +483,7 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info); * @param c: The connection. * * Closes the file descriptor and frees all memory associated with the - * connection @c c. + * connection @c c. If @p c is @c NULL, nothing is done. */ void xcb_disconnect(xcb_connection_t *c); diff --git a/src/xcb_conn.c b/src/xcb_conn.c index ab901a9..fa50985 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -350,7 +350,7 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info) void xcb_disconnect(xcb_connection_t *c) { - if(is_static_error_conn(c)) + if(c == NULL || is_static_error_conn(c)) return; free(c->setup); |