From 683776cdf09c9dce10df4898f15aa5dc61f8f8aa Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Thu, 16 Jul 2020 18:14:52 +0000 Subject: [PATCH] server: Assert that a client has a stream open when processing a message --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 332786f..d5b8b6b 100644 --- a/src/server.c +++ b/src/server.c @@ -651,7 +651,7 @@ static void on_client_event(struct stream* stream, enum stream_event event) { struct nvnc_client* client = stream->userdata; - assert(client->net_stream == stream); + assert(client->net_stream && client->net_stream == stream); if (event == STREAM_EVENT_REMOTE_CLOSED) { log_debug("Client %p (%d) hung up\n", client, client->ref);