menu: ensure all addMenu() calls are followed with setParent() calls
Ensures memory taken by creating a new menu is freed.
This commit is contained in:
@@ -99,6 +99,7 @@ Menu *NodeFactory::CreateMenu()
|
||||
// Create menu here if it doesn't exist
|
||||
if (!found_cat) {
|
||||
Menu* new_category = new Menu(dir_name);
|
||||
new_category->setParent(destination);
|
||||
destination->InsertAlphabetically(new_category);
|
||||
destination = new_category;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user