aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb_ci
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-03-10 12:11:18 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-03-10 12:11:18 +0100
commit4fc2a70eeb86fa51b783b4a9c034b926db0013a3 (patch)
tree1658bf0d43531c466508fa1282a809e94bd0d93f /lib/dvb_ci
parentc598ff78dac60b446b42ae23f3128c518b76642a (diff)
downloadenigma2-4fc2a70eeb86fa51b783b4a9c034b926db0013a3.tar.gz
enigma2-4fc2a70eeb86fa51b783b4a9c034b926db0013a3.zip
small fix
Diffstat (limited to 'lib/dvb_ci')
-rw-r--r--lib/dvb_ci/dvbci.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp
index a0166355..83bbed75 100644
--- 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();
- 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;