mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
fix segfault with static item, supplement to 69ae7d89e3f179a4263abbadc6cc7951607a3854
Origin commit data
------------------
Commit: 9a638ac416
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-03-23 (Sat, 23 Mar 2019)
This commit is contained in:
@@ -778,8 +778,10 @@ 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;
|
||||
if(!items.at(item_id)->isStatic){
|
||||
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