[Pkg-privacy-commits] [irssi-plugin-otr] 04/13: Fix: assertion when server record is NULL

Antoine Beaupré anarcat at moszumanska.debian.org
Wed Mar 23 17:35:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

anarcat pushed a commit to branch debian
in repository irssi-plugin-otr.

commit 988e49e671235021b49fc90d1e52b81ea341ac3f
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Mon Sep 29 16:12:10 2014 -0400

    Fix: assertion when server record is NULL
    
    Fixes #48
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/module.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/module.c b/src/module.c
index 5877315..50533d7 100644
--- a/src/module.c
+++ b/src/module.c
@@ -292,7 +292,14 @@ error_alloc:
 void irssi_send_message(SERVER_REC *irssi, const char *recipient,
 		const char *msg)
 {
-	assert(irssi);
+	/*
+	 * Apparently, there are cases where the server record is NULL which has
+	 * been reported with the irssi xmpp plugin. In that case, just return an
+	 * do nothing.
+	 */
+	if (!irssi) {
+		return;
+	}
 
 	irssi->send_message(irssi, recipient, msg,
 			GPOINTER_TO_INT(SEND_TARGET_NICK));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git



More information about the Pkg-privacy-commits mailing list