]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/html.i
Fixed a bunch of embarassing reference leaks
[wxWidgets.git] / wxPython / src / html.i
index bb978a43d9f60bdbc9191297229f27459d84472d..9d757ed813f92204e8a5c3de3e0e561bcc80a498 100644 (file)
@@ -514,7 +514,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)