From 1bdd13c030b192cd3087eee64a581a0d43766d16 Mon Sep 17 00:00:00 2001 From: Gerd v. Egidy Date: Fri, 21 Nov 2008 10:35:25 +0000 Subject: [PATCH] libt2n: (gerd) add safety-check to send_hello --- src/command_server.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/command_server.cpp b/src/command_server.cpp index 2e3beb5..e41d41b 100644 --- a/src/command_server.cpp +++ b/src/command_server.cpp @@ -54,7 +54,9 @@ command_server::command_server(server& _s) void command_server::send_hello(unsigned int conn_id) { server_connection* sc=s.get_connection(conn_id); - // TODO: Gerd: Throw exception if get_connection() returns NULL or just return? + + if (!sc) + return; // connection not existing, so no hello std::ostringstream hello; -- 1.7.1