From 4c78d4cddfa8f5b9a9d275822237a0b1f8510dd2 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 2 Feb 2014 22:36:43 +0100 Subject: [PATCH] Fix a crash bug on reload. This could happen in the case where we reloaded while still waiting for the request from a given client. --- server.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.cpp b/server.cpp index f508710..ee91ed8 100644 --- a/server.cpp +++ b/server.cpp @@ -482,6 +482,9 @@ sending_data_again: void Server::skip_lost_data(Client *client) { Stream *stream = client->stream; + if (stream == NULL) { + return; + } size_t bytes_to_send = stream->bytes_received - client->stream_pos; if (bytes_to_send > stream->backlog_size) { size_t bytes_lost = bytes_to_send - stream->backlog_size; -- 2.39.2