X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95eb036e7bc151c7fb960eaf34762c56569c3245..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/src/msw/webkit_wrap.cpp diff --git a/wxPython/src/msw/webkit_wrap.cpp b/wxPython/src/msw/webkit_wrap.cpp index c8d8d0c061..722dd84ce4 100644 --- a/wxPython/src/msw/webkit_wrap.cpp +++ b/wxPython/src/msw/webkit_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; } }