X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53aa7709e08bb3cdaa8ec5c4977f32e817aff7d6..c7ca49e407b5c9b6e77165dec55ace350e6c68c2:/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp?ds=sidebyside diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp index cc3db6db8a..382f483148 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas_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; } }