X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6932ae68881f5ad02cf9eeccecff0ea67792add9..a472b1f9e83444fb650bc941b2caafa3bbf497f4:/wxPython/src/msw/_gdi_wrap.cpp diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index cdd3f97890..df4c768f3b 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_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