From 370b57625e5c4e39d27b715609317fe505fdb0e0 Mon Sep 17 00:00:00 2001 From: rentallect Date: Fri, 29 May 2020 09:19:52 -0400 Subject: don't crash if read_stop is not set --- src/uv_link_t.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uv_link_t.c b/src/uv_link_t.c index 32c676e..78ada82 100644 --- a/src/uv_link_t.c +++ b/src/uv_link_t.c @@ -101,7 +101,8 @@ int uv_link_read_start(uv_link_t* link) { int uv_link_read_stop(uv_link_t* link) { if (link == NULL) return uv_link_error(link, UV_EFAULT); - CLOSE_WRAP(link->methods->read_stop(link)); + if (NULL != link->methods->read_stop) + CLOSE_WRAP(link->methods->read_stop(link)); } -- cgit 1.4.1-2-gfad0