CComponentsForm: remove extra item declaration

Remove instances from vector only for sure.
This commit is contained in:
2017-06-15 01:01:54 +02:00
parent 86af640fae
commit 0066430b77

View File

@@ -185,11 +185,10 @@ void CComponentsForm::clear()
return; return;
for(size_t i=0; i<v_cc_items.size(); i++) { for(size_t i=0; i<v_cc_items.size(); i++) {
CComponentsItem *item = v_cc_items[i]; if (v_cc_items[i]){
if (item){ dprintf(DEBUG_DEBUG, "[CComponentsForm] %s... delete form cc-item %d of %d (type=%d)\taddress = %p\n", __func__, (int)i+1, (int)v_cc_items.size(), v_cc_items[i]->getItemType(), v_cc_items[i]);
dprintf(DEBUG_DEBUG, "[CComponentsForm] %s... delete form cc-item %d of %d (type=%d)\taddress = %p\n", __func__, (int)i+1, (int)v_cc_items.size(), item->getItemType(), item); delete v_cc_items[i];
delete item; v_cc_items[i] = NULL;
item = NULL;
} }
} }
v_cc_items.clear(); v_cc_items.clear();