CComponentsForm: prevent wrong id parameter if item size out of range

Origin commit data
------------------
Branch: ni/coolstream
Commit: d72603665c
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-14 (Fri, 14 Nov 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2014-11-14 23:38:52 +01:00
parent 7b267b569c
commit c6df155baf

View File

@@ -250,6 +250,11 @@ int CComponentsForm::genIndex()
CComponentsItem* CComponentsForm::getCCItem(const uint& cc_item_id)
{
if (cc_item_id >= size()){
dprintf(DEBUG_NORMAL, "[CComponentsForm] [%s - %d] Error: parameter cc_item_id = %u, out of range (size = %u)...\n", __func__, __LINE__, cc_item_id, size());
return NULL;
}
if (v_cc_items[cc_item_id])
return v_cc_items[cc_item_id];
return NULL;