Fix possible crash

Thanks to - http://forum.xchat.org/viewtopic.php?f=5&t=7558
This commit is contained in:
TingPing 2013-04-12 23:08:02 -03:00
parent ba3f4daee8
commit 44a2ed5a97
1 changed files with 2 additions and 1 deletions

View File

@ -919,9 +919,10 @@ Context_compare(ContextObject *a, ContextObject *b, int op)
else else
{ {
PyErr_SetString(PyExc_TypeError, "contexts are either equal or not equal"); PyErr_SetString(PyExc_TypeError, "contexts are either equal or not equal");
ret = NULL; ret = Py_None;
} }
Py_INCREF(ret);
return ret; return ret;
} }