X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/59988cd01058e38ea408b0751fdf8bf9cab09f38..c81fd4b937cedd7c53715996200b9126e2756cbc:/wxPython/src/mac/html.cpp?ds=inline diff --git a/wxPython/src/mac/html.cpp b/wxPython/src/mac/html.cpp index 37e1ac0410..5925043ded 100644 --- a/wxPython/src/mac/html.cpp +++ b/wxPython/src/mac/html.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlc" -#include "export.h" +#include "wxPython.h" #include #include #include @@ -264,7 +264,9 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) { PyObject* ro; - ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, wx2PyString(url))); + PyObject* s = wx2PyString(url); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, s)); + Py_DECREF(s); if (PyString_Check(ro) #if PYTHON_API_VERSION >= 1009 || PyUnicode_Check(ro)