about summary refs log tree commit diff stats
path: root/src/uv_link_t.c
diff options
context:
space:
mode:
authorrentallect <curt.tudor@netfoundry.io>2020-05-29 09:19:52 -0400
committerrentallect <curt.tudor@netfoundry.io>2020-05-29 09:19:52 -0400
commit370b57625e5c4e39d27b715609317fe505fdb0e0 (patch)
tree626b28243ed3811626f9d913b7ea13fa0e4e0acc /src/uv_link_t.c
parentb3ae0767c8f5f72bfc381b935866f384205d912b (diff)
downloaduv_link_t-370b57625e5c4e39d27b715609317fe505fdb0e0.tar.gz
don't crash if read_stop is not set
Diffstat (limited to 'src/uv_link_t.c')
-rw-r--r--src/uv_link_t.c3
1 files changed, 2 insertions, 1 deletions
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));
 }