X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/281c54cc42f9ca2578f08218b1eed8d5208db8f7..59571b718e142de7159c6ad3a86d15d4e896593a:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 7bfbb60175..07c2808dc4 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -29,7 +29,11 @@ #include #include #include +#ifdef __WXGTK20__ #include +#else +#include +#endif #define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \ GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) @@ -1822,6 +1826,7 @@ PyObject* wxPy_ConvertList(wxListBase* listbase) { wxObj = node->GetData(); pyObj = wxPyMake_wxObject(wxObj,false); PyList_Append(pyList, pyObj); + Py_DECREF(pyObj); // the Append also does an INCREF, that's one more than we need. node = node->GetNext(); } wxPyEndBlockThreads(blocked);