From: Gerd v. Egidy Date: Fri, 21 Nov 2008 10:35:25 +0000 (+0000) Subject: libt2n: (gerd) add safety-check to send_hello X-Git-Tag: v0.5~13 X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=commitdiff_plain;h=1bdd13c030b192cd3087eee64a581a0d43766d16;hp=4b995a82e29808cf8125889f83ec70fc7b5c77af libt2n: (gerd) add safety-check to send_hello --- 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;