summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-04-12 23:08:02 -0300
committerTingPing <tngpng@gmail.com>2013-04-12 23:08:02 -0300
commit44a2ed5a9794d92cdf3fc5e5dcc52c4b9c95f441 (patch)
tree777b1143cd8fda43ad7017fa9ad2754a81504887 /plugins
parentba3f4daee865544817c7dfa82fb179b6bf80f0dd (diff)
Fix possible crash
Thanks to - http://forum.xchat.org/viewtopic.php?f=5&t=7558
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/python.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 3305ce2c..912341a8 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -919,9 +919,10 @@ Context_compare(ContextObject *a, ContextObject *b, int op)
 	else
 	{
 		PyErr_SetString(PyExc_TypeError, "contexts are either equal or not equal");
-		ret = NULL;
+		ret = Py_None;
 	}
 
+	Py_INCREF(ret);
 	return ret;
 }