X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f4d7c19ba32ba4a4c2220a0508edcfe54bba4e5..ccbb33c91bc98f9ace71aff5e7b1cd1356004753:/wxPython/src/gtk/_gdi_wrap.cpp diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index c733f3815b..5d16da0566 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_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; } } @@ -1721,7 +1722,7 @@ SWIG_Check_int(PyObject* obj) static PyObject *wxPen_GetDashes(wxPen *self){ wxDash* dashes; int count = self->GetDashes(&dashes); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* retval = PyList_New(0); for (int x=0; x