]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/html.cpp
Use the iconIndex in the default case too.
[wxWidgets.git] / wxPython / src / gtk / html.cpp
index 1c8f38e178f6c12a91284c43248e2fe86fc19c7c..45ce76a2ad9f8d7d4ef7dd57aed6e313ced8a9b9 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)