diff options
-rw-r--r-- | lib/core-net/adopt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/core-net/adopt.c b/lib/core-net/adopt.c index 212adc4d..963fd3d2 100644 --- a/lib/core-net/adopt.c +++ b/lib/core-net/adopt.c @@ -133,6 +133,9 @@ __lws_adopt_descriptor_vhost1(struct lws_vhost *vh, lws_adoption_type type, * we initialize it, it may become "live" concurrently unexpectedly... */ + if (!vh) + return NULL; + lws_context_assert_lock_held(vh->context); n = -1; |