summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/red_channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index e526179e..d2c9e6d8 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -162,6 +162,10 @@ static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handle
uint16_t msg_type;
uint32_t msg_size;
+ if (!stream) {
+ return;
+ }
+
for (;;) {
int ret_handle;
if (handler->header_pos < handler->header.header_size) {