DirMenu.cpp: fix memory leak.
Signed-off-by: Adrien Destugues <[email protected]> Fixes #13118.
This commit is contained in:
committed by
Adrien Destugues
parent
76c469dbcf
commit
4ad2ad6d84
@@ -95,10 +95,12 @@ BDirMenu::Populate(const BEntry* startEntry, BWindow* originatingWindow,
|
||||
Model model(startEntry);
|
||||
ThrowOnInitCheckError(&model);
|
||||
|
||||
ModelMenuItem* menu = new ModelMenuItem(&model, this, true, true);
|
||||
ModelMenuItem* menu = NULL;
|
||||
|
||||
if (fMenuBar)
|
||||
if (fMenuBar) {
|
||||
menu = new ModelMenuItem(&model, this, true, true);
|
||||
fMenuBar->AddItem(menu);
|
||||
}
|
||||
|
||||
BEntry entry(*startEntry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user