From 35fef0534b58648d43de2972d2d84fd60f132cfc Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 14 Nov 2015 07:02:38 +0800 Subject: [PATCH] plat win be robust against NULL wsi_from_fd 3 Signed-off-by: Andy Green --- lib/lws-plat-win.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c index afb640d..e12d1ee 100644 --- a/lib/lws-plat-win.c +++ b/lib/lws-plat-win.c @@ -199,7 +199,8 @@ lws_plat_service(struct libwebsocket_context *context, int timeout_ms) if (pfd->revents & LWS_POLLOUT) { wsi = wsi_from_fd(context, pfd->fd); - wsi->sock_send_blocking = FALSE; + if (wsi) + wsi->sock_send_blocking = FALSE; } return libwebsocket_service_fd(context, pfd); -- 2.7.4