X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94c162795e6ebff164bcfc7bb9aa0138dd83b194..31988931ca21eb21a493db848dc948433599389c:/wxPython/src/gtk/html.cpp diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index a92126552f..45ce76a2ad 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/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)