don't leak the bmessenger. CID 888

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27746 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-09-25 15:51:29 +00:00
parent 85d7d4bc41
commit 2b389c6e5a
+3 -3
View File
@@ -847,6 +847,7 @@ TFavoritesConfigWindow::PromptForAdd()
fAddPanel->Show();
// does an activate on the window
else {
BMessenger messenger(this, this);
// determine a starting point for where apps are added from
char appPath[B_PATH_NAME_LENGTH];
@@ -856,11 +857,10 @@ TFavoritesConfigWindow::PromptForAdd()
// get reference to application directory
get_ref_for_path(appPath, &ref);
fAddPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this, this),
fAddPanel = new BFilePanel(B_OPEN_PANEL, &messenger,
&ref, fFilePanelNodeFlavors, true);
} else
fAddPanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(this, this),
fAddPanel = new BFilePanel(B_OPEN_PANEL, &messenger,
NULL, fFilePanelNodeFlavors, true);
fAddPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Add");