summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index cfe616f5..ad8c0506 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -339,9 +339,12 @@ GLOBAL bool
 IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reason)
 {
 	const char *msg;
-	CONN_ID my_conn, conn;
+	CONN_ID my_conn = NONE, conn;
 	CLIENT *c;
 
+	assert(Nick != NULL);
+	assert(Reason != NULL);
+
 	/* Do we know such a client in the network? */
 	c = Client_Search(Nick);
 	if (!c) {
@@ -376,7 +379,8 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
 	}
 
 	/* Save ID of this connection */
-	my_conn = Client_Conn(Client);
+	if (Client)
+		my_conn = Client_Conn(Client);
 
 	/* Kill the client NOW:
 	 *  - Close the local connection (if there is one),