X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6dcb75c26bbfec04b381bb99d75404f9fe50635d..d6ed3400b2cdfd156aa9f6504079aeab53db1f69:/lib/gui/elistboxcontent.cpp diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index d4272a0a..621fa5cc 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -195,10 +195,8 @@ void eListboxPythonStringContent::setList(ePyObject list) PyObject *eListboxPythonStringContent::getCurrentSelection() { if (!(m_list && cursorValid())) - { - Py_INCREF(Py_None); - return Py_None; - } + Py_RETURN_NONE; + ePyObject r = PyList_GET_ITEM(m_list, m_cursor); Py_XINCREF(r); return r;