From 44a2ed5a9794d92cdf3fc5e5dcc52c4b9c95f441 Mon Sep 17 00:00:00 2001 From: TingPing Date: Fri, 12 Apr 2013 23:08:02 -0300 Subject: Fix possible crash Thanks to - http://forum.xchat.org/viewtopic.php?f=5&t=7558 --- plugins/python/python.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit 1.4.1