CMenuWidget: avoid dangling pointer after delete

Origin commit data
------------------
Branch: ni/coolstream
Commit: 91729dc48a
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-05-04 (Wed, 04 May 2016)


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

------------------
This commit was generated by Migit
This commit is contained in:
2016-05-04 17:42:51 +02:00
parent fdd6e59bfb
commit 6cb561b25e

View File

@@ -677,8 +677,10 @@ void CMenuWidget::resetWidget(bool delete_items)
{
for(unsigned int count=0;count<items.size();count++) {
CMenuItem * item = items[count];
if (delete_items && !item->isStatic)
if (delete_items && !item->isStatic){
delete item;
item = NULL;
}
}
items.clear();