X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70b7a5fe0cb26e15c52bcdeb730f43eb3838360f..cda6fc01ba80a7a0cd159d10ccaeaea6573bf41b:/wxPython/src/gtk/_core_wrap.cpp diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index bc374b41f3..88cb06f693 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_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; } }