X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e2129f90f06ac57918023898392a8f3020b2a22..a4353f07c6b37712634d4b2d86527b647a08044f:/wxPython/src/msw/html.cpp diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index 82788159f1..0d8c6925db 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -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)