X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb2ef2cc9ed97a347c3a5f45b51127b6faa301aa..cda6fc01ba80a7a0cd159d10ccaeaea6573bf41b:/wxPython/src/mac/_gdi_wrap.cpp?ds=inline diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 04a73f8729..7456895c53 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_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; } }