don't crash if read_stop is not set

This commit is contained in:
rentallect 2020-05-29 09:19:52 -04:00
parent b3ae0767c8
commit 370b57625e
1 changed files with 2 additions and 1 deletions

View File

@ -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));
}