From 7539be679783892192bcfaca81ffa0801bdb334b Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 2 Sep 2008 11:17:48 +0200 Subject: [PATCH] safety fix --- Cython/Compiler/Nodes.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index f3b5bd98..2738fd66 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -4881,11 +4881,9 @@ void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; - if (*type) { - Py_INCREF(*type); - Py_XINCREF(*value); - Py_XINCREF(*tb); - } + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); } void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { -- 2.26.2