mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
widget/menue fix memleak, CMenuWidget::removeItem
Origin commit data
------------------
Commit: 34ac796ffa
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-03-20 (Wed, 20 Mar 2019)
This commit is contained in:
@@ -778,6 +778,8 @@ void CMenuWidget::insertItem(const uint& item_id, CMenuItem* menuItem)
|
||||
|
||||
void CMenuWidget::removeItem(const uint& item_id)
|
||||
{
|
||||
delete items.at(item_id);
|
||||
items.at(item_id) = NULL;
|
||||
items.erase(items.begin()+item_id);
|
||||
if ((unsigned int) selected >= items.size())
|
||||
selected = items.size() - 1;
|
||||
|
Reference in New Issue
Block a user