X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7993762b11cb07b74c6f6de483523881dea95482..30928f55c46eea3e83c110cfb0bc7f0ee7b583e7:/wxPython/src/mac/_controls_wrap.cpp diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 551f5a3828..d5959d4d2d 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_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; } }