]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/html.cpp
SWIGged changes for wxMac
[wxWidgets.git] / wxPython / src / msw / html.cpp
index 82788159f1bcb219ba20031c169187a1a9c235db..0d8c6925db574b27d49e71e1a7389579c843822a 100644 (file)
@@ -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)