diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 430423045..33dd15c94 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -185,11 +185,10 @@ void CComponentsForm::clear() return; for(size_t i=0; igetItemType(), item); - delete item; - item = NULL; + if (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(), v_cc_items[i]->getItemType(), v_cc_items[i]); + delete v_cc_items[i]; + v_cc_items[i] = NULL; } } v_cc_items.clear();