X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9f9c513165bbcae496b79656304e60bf74557af4..91eaa14c3fa4ca9596b91d1754976108f3882717:/lib/gui/elistboxcontent.cpp diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index d72b21bc..1866d3ad 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -260,6 +260,7 @@ eListboxPythonStringContent::eListboxPythonStringContent() eListboxPythonStringContent::~eListboxPythonStringContent() { + Py_XDECREF(m_list); } void eListboxPythonStringContent::cursorHome() @@ -423,12 +424,12 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, /* handle left part. get item from tuple, convert to string, display. */ text = PyTuple_GET_ITEM(item, 0); -// text = PyObject_Str(text); /* creates a new object - old object was borrowed! */ + text = PyObject_Str(text); /* creates a new object - old object was borrowed! */ const char *string = (text && PyString_Check(text)) ? PyString_AsString(text) : ""; eSize item_left = eSize(m_seperation, m_itemsize.height()); eSize item_right = eSize(m_itemsize.width() - m_seperation, m_itemsize.height()); painter.renderText(eRect(offset, item_left), string, gPainter::RT_HALIGN_LEFT); -// Py_XDECREF(text); + Py_XDECREF(text); /* now, handle the value. get 2nd part from tuple*/ value = PyTuple_GET_ITEM(item, 1);