X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2950dbb1f759c12b300f1ea98815bdf9f76204c..d0ee33f5c6908b4ac5e1364381f0ef00942e3936:/wxPython/src/msw/xrc_wrap.cpp diff --git a/wxPython/src/msw/xrc_wrap.cpp b/wxPython/src/msw/xrc_wrap.cpp index c0159f9434..de198811ab 100644 --- a/wxPython/src/msw/xrc_wrap.cpp +++ b/wxPython/src/msw/xrc_wrap.cpp @@ -1037,7 +1037,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_DECREF(str); + if (str) + Py_DECREF(str); return; } }