mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user