X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a446332930f51af5c85fb9b73e26f87fc65cd2c..3a9becbd5439254a77e7dbc0278d80117a397264:/wxPython/src/msw/html_wrap.cpp?ds=sidebyside diff --git a/wxPython/src/msw/html_wrap.cpp b/wxPython/src/msw/html_wrap.cpp index 68e13af46e..11eb115304 100644 --- a/wxPython/src/msw/html_wrap.cpp +++ b/wxPython/src/msw/html_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; } }