X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f491ed976a302a328566f5999b7143a28791f034..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/src/mac/_gdi_wrap.cpp?ds=sidebyside diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 6b2dadb735..418150932b 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_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