X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e45c9071ecfc333c8ae17c11fe9c1031fcef81b9..94c09a19ec0406118b51b60657232ea3b14d6c4f:/wxPython/src/gtk/webkit_wrap.cpp?ds=sidebyside diff --git a/wxPython/src/gtk/webkit_wrap.cpp b/wxPython/src/gtk/webkit_wrap.cpp index 6927b2f5f2..659a749cea 100644 --- a/wxPython/src/gtk/webkit_wrap.cpp +++ b/wxPython/src/gtk/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; } }