summary refs log tree commit diff stats
path: root/plugins/python/python.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/python/python.c')
-rw-r--r--plugins/python/python.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 8b768799..2976faeb 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -934,10 +934,10 @@ Context_compare(ContextObject *a, ContextObject *b, int op)
 	else
 	{
 		PyErr_SetString(PyExc_TypeError, "contexts are either equal or not equal");
-		Py_INCREF(Py_None);
 		ret = Py_None;
 	}
 
+	Py_INCREF(ret);
 	return ret;
 }