projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d98961
)
return None when there is no list or invalid cursor
author
Felix Domke
<tmbinc@elitedvb.net>
Sun, 26 Feb 2006 23:27:36 +0000
(23:27 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Sun, 26 Feb 2006 23:27:36 +0000
(23:27 +0000)
lib/gui/elistboxcontent.cpp
patch
|
blob
|
history
diff --git
a/lib/gui/elistboxcontent.cpp
b/lib/gui/elistboxcontent.cpp
index
ff93eac
..
2b3c0fc
100644
(file)
--- a/
lib/gui/elistboxcontent.cpp
+++ b/
lib/gui/elistboxcontent.cpp
@@
-374,10
+374,11
@@
void eListboxPythonStringContent::setList(PyObject *list)
PyObject *eListboxPythonStringContent::getCurrentSelection()
{
- if (!m_list)
- return 0;
- if (!cursorValid())
- return 0;
+ if (!(m_list && cursorValid()))
+ {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
PyObject *r = PyList_GET_ITEM(m_list, m_cursor);
Py_XINCREF(r);
return r;