projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c598ff7
)
small fix
author
ghost
<andreas.monzner@multimedia-labs.de>
Tue, 10 Mar 2009 11:11:18 +0000
(12:11 +0100)
committer
ghost
<andreas.monzner@multimedia-labs.de>
Tue, 10 Mar 2009 11:11:18 +0000
(12:11 +0100)
lib/dvb_ci/dvbci.cpp
patch
|
blob
|
history
diff --git
a/lib/dvb_ci/dvbci.cpp
b/lib/dvb_ci/dvbci.cpp
index
a016635
..
83bbed7
100644
(file)
--- a/
lib/dvb_ci/dvbci.cpp
+++ b/
lib/dvb_ci/dvbci.cpp
@@
-926,10
+926,13
@@
PyObject *eDVBCIInterfaces::readCICaIds(int slotid)
{
int idx=0;
eDVBCICAManagerSession *ca_manager = slot->getCAManager();
{
int idx=0;
eDVBCICAManagerSession *ca_manager = slot->getCAManager();
- const std::vector<uint16_t> &ci_caids = ca_manager->getCAIDs();
- ePyObject list = PyList_New(ci_caids.size());
- for (std::vector<uint16_t>::const_iterator it = ci_caids.begin(); it != ci_caids.end(); ++it)
- PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it));
+ const std::vector<uint16_t> *ci_caids = ca_manager ? &ca_manager->getCAIDs() : 0;
+ ePyObject list = PyList_New(ci_caids ? ci_caids->size() : 0);
+ if (ci_caids)
+ {
+ for (std::vector<uint16_t>::const_iterator it = ci_caids->begin(); it != ci_caids->end(); ++it)
+ PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it));
+ }
return list;
}
return 0;
return list;
}
return 0;